Memory leak detection bugfixes for multi-threading.
[openssl.git] / apps / sess_id.c
index 71d5aa0b7c6cde62d68759445f954d696df9716e..eb40aa63538103a805ac0c3d68696f13f58bd9df 100644 (file)
@@ -156,7 +156,7 @@ int MAIN(int argc, char **argv)
                {
 bad:
                for (pp=sess_id_usage; (*pp != NULL); pp++)
-                       BIO_printf(bio_err,*pp);
+                       BIO_printf(bio_err,"%s",*pp);
                goto end;
                }
 
@@ -206,7 +206,15 @@ bad:
                        }
 
                if (outfile == NULL)
+                       {
                        BIO_set_fp(out,stdout,BIO_NOCLOSE);
+#ifdef VMS
+                       {
+                       BIO *tmpbio = BIO_new(BIO_f_linebuffer());
+                       out = BIO_push(tmpbio, out);
+                       }
+#endif
+                       }
                else
                        {
                        if (BIO_write_filename(out,outfile) <= 0)
@@ -262,7 +270,7 @@ bad:
                }
        ret=0;
 end:
-       if (out != NULL) BIO_free(out);
+       if (out != NULL) BIO_free_all(out);
        if (x != NULL) SSL_SESSION_free(x);
        EXIT(ret);
        }