Fix UI leak in apps.
[openssl.git] / apps / apps.c
index 000157772f911123fa50d32dddbf270cce33e84f..9bbf476245c8f783ebbfe723e82f4456a252f57d 100644 (file)
@@ -434,6 +434,14 @@ int setup_ui_method()
        UI_method_set_closer(ui_method, ui_close);
        return 0;
        }
        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)
        {
 int password_callback(char *buf, int bufsiz, int verify,
        PW_CB_DATA *cb_tmp)
        {