Skip to content
Snippets Groups Projects
Commit 8e7d982e authored by Simon McVittie's avatar Simon McVittie Committed by Vivek Das Mohapatra
Browse files

capsule_dlmopen: Don't dereference NULL if caller is ignoring error


This is a char *-based version of the usual GError pattern.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent a152b303
No related branches found
No related tags found
1 merge request!311Build capsule-capture-libs from a bundled copy of libcapsule
......@@ -182,13 +182,15 @@ static int install_wrappers ( void *dl_handle,
if( dlinfo( dl_handle, RTLD_DI_LINKMAP, &map ) != 0 )
{
const char *local_error = dlerror();
if( error )
*error = strdup( dlerror() );
*error = strdup( local_error );
if( errcode )
*errcode = EINVAL;
DEBUG( DEBUG_WRAPPERS, "mangling capsule symbols: %s", *error );
DEBUG( DEBUG_WRAPPERS, "mangling capsule symbols: %s", local_error );
return -1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment