lib/hcrypto: ENGINE_by_dso do not leak handle
Must dlclose(handle) before returning even if 'engine' is returned to caller. Change-Id: I169044a768934e9b7774a323fe6c855fd07a09e4
This commit is contained in:

committed by
Jeffrey Altman

parent
440ea95b56
commit
3707c52ea7
@@ -349,12 +349,12 @@ ENGINE_by_dso(const char *path, const char *id)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
dlclose(handle);
|
||||
|
||||
ENGINE_up_ref(engine);
|
||||
|
||||
ret = add_engine(engine);
|
||||
if (ret != 1) {
|
||||
dlclose(handle);
|
||||
ENGINE_finish(engine);
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user