Fix memory leak in GENERAL_NAME_set0_othername.
[openssl.git] / crypto / engine / eng_dyn.c
index 3169b09ad865111694c33f0c4d963ddff65196de..40f30e9d585e212ea243d59b15ece1bc61916098 100644 (file)
@@ -243,8 +243,10 @@ static int dynamic_set_data_ctx(ENGINE *e, dynamic_data_ctx **ctx)
      * If we lost the race to set the context, c is non-NULL and *ctx is the
      * context of the thread that won.
      */
-    if (c)
+    if (c) {
+        sk_OPENSSL_STRING_free(c->dirs);
         OPENSSL_free(c);
+    }
     return 1;
 }