mirror of
https://github.com/weechat/weechat.git
synced 2026-06-27 21:36:37 +02:00
core: remove check of NULL pointers before calling string_dyn_free() (issue #865)
This commit is contained in:
@@ -2787,8 +2787,7 @@ eval_expression (const char *expr, struct t_hashtable *pointers,
|
||||
/* set debug in options hashtable */
|
||||
if (options && eval_context->debug_output)
|
||||
hashtable_set (options, "debug_output", *(eval_context->debug_output));
|
||||
if (eval_context->debug_output)
|
||||
string_dyn_free (eval_context->debug_output, 1);
|
||||
string_dyn_free (eval_context->debug_output, 1);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -491,8 +491,7 @@ hook_command_format_args_description (const char *args_description)
|
||||
|
||||
error:
|
||||
arraylist_free (args);
|
||||
if (result)
|
||||
string_dyn_free (result, 1);
|
||||
string_dyn_free (result, 1);
|
||||
string_free_split (lines);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+2
-4
@@ -819,10 +819,8 @@ gui_key_expand (const char *key, char **key_name, char **key_name_alias)
|
||||
return 1;
|
||||
|
||||
error:
|
||||
if (str_dyn_key)
|
||||
string_dyn_free (str_dyn_key, 1);
|
||||
if (str_dyn_key_alias)
|
||||
string_dyn_free (str_dyn_key_alias, 1);
|
||||
string_dyn_free (str_dyn_key, 1);
|
||||
string_dyn_free (str_dyn_key_alias, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user