Fix the Win32_rename() function so it correctly
[oweals/openssl.git] / apps / ca.c
index 2eec0957f11d17d54f3a25be5fcae61d4fedb7c3..6ef3eb0f0f7d2d76841a30565982d878776e747e 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -1569,6 +1569,10 @@ bad:
                                }
                        j=TXT_DB_write(out,db);
                        if (j <= 0) goto err;
+                       BIO_free_all(out);
+                       out = NULL;
+                       BIO_free_all(in);
+                       in = NULL;
                        strncpy(buf[1],dbfile,BSIZE-4);
                        buf[1][BSIZE-4]='\0';
 #ifndef OPENSSL_SYS_VMS