mirror of
https://github.com/weechat/weechat.git
synced 2026-07-04 16:53:14 +02:00
php: remove check of NULL pointers before calling free() (issue #865)
This commit is contained in:
@@ -747,8 +747,7 @@ weechat_php_unload (struct t_plugin_script *script)
|
||||
WEECHAT_SCRIPT_EXEC_INT,
|
||||
script->shutdown_func,
|
||||
NULL, NULL);
|
||||
if (rc)
|
||||
free (rc);
|
||||
free (rc);
|
||||
}
|
||||
|
||||
filename = strdup (script->filename);
|
||||
@@ -761,8 +760,7 @@ weechat_php_unload (struct t_plugin_script *script)
|
||||
|
||||
(void) weechat_hook_signal_send ("php_script_unloaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, filename);
|
||||
if (filename)
|
||||
free (filename);
|
||||
free (filename);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -948,8 +946,7 @@ weechat_php_command_cb (const void *pointer, void *data,
|
||||
ptr_name, 1);
|
||||
weechat_php_load ((path_script) ? path_script : ptr_name,
|
||||
NULL);
|
||||
if (path_script)
|
||||
free (path_script);
|
||||
free (path_script);
|
||||
}
|
||||
else if (weechat_strcmp (argv[1], "reload") == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user