summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/php/weechat-php-api.c6
-rw-r--r--src/plugins/php/weechat-php.c9
2 files changed, 5 insertions, 10 deletions
diff --git a/src/plugins/php/weechat-php-api.c b/src/plugins/php/weechat-php-api.c
index 3624ba7ea..72dcfe948 100644
--- a/src/plugins/php/weechat-php-api.c
+++ b/src/plugins/php/weechat-php-api.c
@@ -214,8 +214,7 @@ weechat_php_cb (const void *pointer, void *data, void **func_argv,
if (ret_type == WEECHAT_SCRIPT_EXEC_IGNORE)
{
- if (ret)
- free (ret);
+ free (ret);
}
else if (ret_type == WEECHAT_SCRIPT_EXEC_INT)
{
@@ -235,8 +234,7 @@ weechat_php_cb (const void *pointer, void *data, void **func_argv,
weechat_php_cb_err:
if (ret_type == WEECHAT_SCRIPT_EXEC_IGNORE)
{
- if (ret)
- free (ret);
+ free (ret);
}
else if (ret_type == WEECHAT_SCRIPT_EXEC_INT)
{
diff --git a/src/plugins/php/weechat-php.c b/src/plugins/php/weechat-php.c
index 4c5dafd82..633f243c1 100644
--- a/src/plugins/php/weechat-php.c
+++ b/src/plugins/php/weechat-php.c
@@ -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)
{