Commit 2d9ea592 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix NULL dereference (CID#149)

This bug can never happen, as we never call with pppsz_longname == NULL
at the moment.
parent 415696ae
...@@ -736,7 +736,8 @@ char ** module_GetModulesNamesForCapability( const char *psz_capability, ...@@ -736,7 +736,8 @@ char ** module_GetModulesNamesForCapability( const char *psz_capability,
if( !psz_ret || ( pppsz_longname && *pppsz_longname == NULL ) ) if( !psz_ret || ( pppsz_longname && *pppsz_longname == NULL ) )
{ {
free( psz_ret ); free( psz_ret );
free( *pppsz_longname ); if( pppsz_longname )
free( *pppsz_longname );
*pppsz_longname = NULL; *pppsz_longname = NULL;
module_list_free (list); module_list_free (list);
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment