Commit 2b068d3a authored by Rémi Duraffort's avatar Rémi Duraffort

zsh: fix some others memory leaks.

parent ef0bcc79
...@@ -154,6 +154,7 @@ void ParseModules( mumap &mods, mcmap &mods2 ) ...@@ -154,6 +154,7 @@ void ParseModules( mumap &mods, mcmap &mods2 )
while( i_items++ < p_module->i_config_items && p_item++ ); while( i_items++ < p_module->i_config_items && p_item++ );
} }
module_list_free( p_list );
} }
void PrintModuleList( mumap &mods, mcmap &mods2 ) void PrintModuleList( mumap &mods, mcmap &mods2 )
...@@ -428,8 +429,10 @@ void PrintOption( char *psz_option, char i_short, char *psz_exclusive, ...@@ -428,8 +429,10 @@ void PrintOption( char *psz_option, char i_short, char *psz_exclusive,
strchr( psz_longtext, '(' ) ) psz_longtext = psz_text; strchr( psz_longtext, '(' ) ) psz_longtext = psz_text;
if( i_short ) if( i_short )
{ {
if( !psz_exclusive ) psz_exclusive = strdup( "" ); if( !psz_exclusive )
else asprintf( &psz_exclusive, " %s", psz_exclusive ); printf( " \"(-%c)--%s%s[%s]", i_short,
psz_option, psz_args?"=":"", psz_text );
else
printf( " \"(-%c%s)--%s%s[%s]", i_short, psz_exclusive, printf( " \"(-%c%s)--%s%s[%s]", i_short, psz_exclusive,
psz_option, psz_args?"=":"", psz_text ); psz_option, psz_args?"=":"", psz_text );
if( psz_args ) if( psz_args )
...@@ -456,7 +459,6 @@ void PrintOption( char *psz_option, char i_short, char *psz_exclusive, ...@@ -456,7 +459,6 @@ void PrintOption( char *psz_option, char i_short, char *psz_exclusive,
printf( ":%s:%s\"\\\n", psz_longtext, psz_args ); printf( ":%s:%s\"\\\n", psz_longtext, psz_args );
else else
printf( "\"\\\n" ); printf( "\"\\\n" );
} }
} }
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