Fix UI leak in apps.
authorDr. Stephen Henson <steve@openssl.org>
Sat, 23 Jun 2001 12:48:46 +0000 (12:48 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sat, 23 Jun 2001 12:48:46 +0000 (12:48 +0000)
apps/apps.c
apps/apps.h
apps/openssl.c

index 000157772f911123fa50d32dddbf270cce33e84f..9bbf476245c8f783ebbfe723e82f4456a252f57d 100644 (file)
@@ -434,6 +434,14 @@ int setup_ui_method()
        UI_method_set_closer(ui_method, ui_close);
        return 0;
        }
+void destroy_ui_method()
+       {
+       if(ui_method)
+               {
+               UI_destroy_method(ui_method);
+               ui_method = NULL;
+               }
+       }
 int password_callback(char *buf, int bufsiz, int verify,
        PW_CB_DATA *cb_tmp)
        {
index 7cf4bf135dd9493aeb83ba4166ab15211c1d42cb..7f3903478ff4211a3a057fd6162cd50173b6f178 100644 (file)
@@ -155,6 +155,7 @@ int password_callback(char *buf, int bufsiz, int verify,
        PW_CB_DATA *cb_data);
 
 int setup_ui_method();
+void destroy_ui_method();
 
 int should_retry(int i);
 int args_from_file(char *file, int *argc, char **argv[]);
index 6a942078482e68896b53311e34e1748be001ca8b..3b4374a0488dd933482e731fb63a0bb34f8b93a7 100644 (file)
@@ -350,6 +350,7 @@ end:
        ERR_free_strings();
        
         ENGINE_cleanup();
+       destroy_ui_method();
 
        CRYPTO_mem_leaks(bio_err);
        if (bio_err != NULL)