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:24 +00:00
parent aa9b502619
commit 1eda14b44f

View file

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