Skip to content
Snippets Groups Projects
Commit 56302587 authored by Simon McVittie's avatar Simon McVittie
Browse files

init: Don't try to cope with meta being NULL


We unconditionally deference meta anyway, so we'd just crash.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 181fec5c
Branches
Tags
1 merge request!311Build capsule-capture-libs from a bundled copy of libcapsule
......@@ -400,23 +400,29 @@ capsule_init (const char *soname)
meta = get_cached_metadata( soname );
}
if( meta )
if( !meta )
{
handle->prefix = meta->active_prefix;
fprintf( stderr,
"libcapsule: %s: Fatal error: cannot initialize shim "
"library (capsule_meta not found)\n",
soname );
abort();
}
for( size_t i = 0; i < _capsule_metadata_list->next; i++ )
{
capsule_metadata *cm = ptr_list_nth_ptr( _capsule_metadata_list, i );
handle->prefix = meta->active_prefix;
for( size_t i = 0; i < _capsule_metadata_list->next; i++ )
{
capsule_metadata *cm = ptr_list_nth_ptr( _capsule_metadata_list, i );
if( !cm || cm->closed )
continue;
if( !cm || cm->closed )
continue;
DEBUG( DEBUG_CAPSULE, " ");
DUMP_METADATA( i, cm );
DUMP_STRV( excluded, cm->combined_exclude );
DUMP_STRV( exported, cm->combined_export );
DUMP_STRV( nowrap, cm->combined_nowrap );
}
DEBUG( DEBUG_CAPSULE, " ");
DUMP_METADATA( i, cm );
DUMP_STRV( excluded, cm->combined_exclude );
DUMP_STRV( exported, cm->combined_export );
DUMP_STRV( nowrap, cm->combined_nowrap );
}
handle->seen.all = ptr_list_alloc( 32 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment