Skip to content
Snippets Groups Projects
Commit 59a51a88 authored by Vivek Das Mohapatra's avatar Vivek Das Mohapatra
Browse files

Always exit through the free/cleanup path in capsule_shim_dlopen

parent 1be3ee97
No related branches found
No related tags found
1 merge request!311Build capsule-capture-libs from a bundled copy of libcapsule
...@@ -1475,7 +1475,7 @@ capsule_shim_dlopen(Lmid_t ns, ...@@ -1475,7 +1475,7 @@ capsule_shim_dlopen(Lmid_t ns,
const char *file, const char *file,
int flag) int flag)
{ {
void *res; void *res = NULL;
int code = 0; int code = 0;
char *errors = NULL; char *errors = NULL;
ldlibs_t ldlibs = { 0 }; ldlibs_t ldlibs = { 0 };
...@@ -1518,11 +1518,10 @@ capsule_shim_dlopen(Lmid_t ns, ...@@ -1518,11 +1518,10 @@ capsule_shim_dlopen(Lmid_t ns,
res = load_ldlibs( &ldlibs, &ns, flag, &code, &errors ); res = load_ldlibs( &ldlibs, &ns, flag, &code, &errors );
if( !res ) if( !res )
{
DEBUG( DEBUG_WRAPPERS, DEBUG( DEBUG_WRAPPERS,
"capsule dlopen error %d: %s", code, errors ); "capsule dlopen error %d: %s", code, errors );
goto cleanup;
} goto cleanup;
} }
else // no prefix: straightforward dlmopen into our capsule namespace: else // no prefix: straightforward dlmopen into our capsule namespace:
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment