Fix the Win32_rename() function so it correctly
[openssl.git] / apps / ca.c
index f368d39b97c76466e4966760b05a63f504999666..583977718969447b14de8465f1296dc604dc3311 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -1581,6 +1581,10 @@ bad:
 #else
                        strcat(buf[1],"-old");
 #endif
+                       BIO_free(in);
+                       in = NULL;
+                       BIO_free(out);
+                       out = NULL;
                        if (rename(dbfile,buf[1]) < 0)
                                {
                                BIO_printf(bio_err,"unable to rename %s to %s\n", dbfile, buf[1]);