improved error checking and some fixes
[openssl.git] / crypto / ui / ui_lib.c
index 1a8f3ce113ea6de25248cde5339709309a47cec8..7ab249c3be320acd30f5e778c26cb7f98a212a11 100644 (file)
@@ -620,8 +620,10 @@ UI_METHOD *UI_create_method(char *name)
        UI_METHOD *ui_method = (UI_METHOD *)OPENSSL_malloc(sizeof(UI_METHOD));
 
        if (ui_method)
+               {
                memset(ui_method, 0, sizeof(*ui_method));
-       ui_method->name = BUF_strdup(name);
+               ui_method->name = BUF_strdup(name);
+               }
        return ui_method;
        }