summaryrefslogtreecommitdiff
path: root/src/plugins/javascript/weechat-js-api.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/javascript/weechat-js-api.cpp')
-rw-r--r--src/plugins/javascript/weechat-js-api.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/plugins/javascript/weechat-js-api.cpp b/src/plugins/javascript/weechat-js-api.cpp
index c17fe046a..3cea774df 100644
--- a/src/plugins/javascript/weechat-js-api.cpp
+++ b/src/plugins/javascript/weechat-js-api.cpp
@@ -1216,9 +1216,7 @@ weechat_js_api_config_option_change_cb (const void *pointer, void *data,
WEECHAT_SCRIPT_EXEC_IGNORE,
ptr_function,
"ss", func_argv);
-
- if (rc)
- free (rc);
+ free (rc);
}
}
@@ -1243,9 +1241,7 @@ weechat_js_api_config_option_delete_cb (const void *pointer, void *data,
WEECHAT_SCRIPT_EXEC_IGNORE,
ptr_function,
"ss", func_argv);
-
- if (rc)
- free (rc);
+ free (rc);
}
}
@@ -2864,8 +2860,7 @@ weechat_js_api_hook_print_cb (const void *pointer, void *data,
ret = *rc;
free (rc);
}
- if (func_argv[3])
- free (func_argv[3]);
+ free (func_argv[3]);
return ret;
}