Submitted by: Torsten Hilbrich <torsten.hilbrich@secunet.com>

Fix memory leak when engine name cannot be loaded.
This commit is contained in:
Dr. Stephen Henson 2010-03-27 18:28:13 +00:00
parent 30fc2ab92b
commit 348620c7ac

View file

@ -413,6 +413,7 @@ ENGINE *ENGINE_by_id(const char *id)
return iterator; return iterator;
} }
notfound: notfound:
ENGINE_free(iterator);
ENGINEerr(ENGINE_F_ENGINE_BY_ID,ENGINE_R_NO_SUCH_ENGINE); ENGINEerr(ENGINE_F_ENGINE_BY_ID,ENGINE_R_NO_SUCH_ENGINE);
ERR_add_error_data(2, "id=", id); ERR_add_error_data(2, "id=", id);
return NULL; return NULL;