summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/php/weechat-php-api.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/plugins/php/weechat-php-api.c b/src/plugins/php/weechat-php-api.c
index 0f9e1a554..e95bf5786 100644
--- a/src/plugins/php/weechat-php-api.c
+++ b/src/plugins/php/weechat-php-api.c
@@ -566,11 +566,19 @@ API_FUNC(string_eval_expression)
WEECHAT_SCRIPT_HASHTABLE_DEFAULT_SIZE,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_STRING);
+
result = weechat_string_eval_expression ((const char *)expr,
pointers,
extra_vars,
options);
+ if (pointers)
+ weechat_hashtable_free (pointers);
+ if (extra_vars)
+ weechat_hashtable_free (extra_vars);
+ if (options)
+ weechat_hashtable_free (options);
+
API_RETURN_STRING_FREE(result);
}
@@ -603,11 +611,19 @@ API_FUNC(string_eval_path_home)
WEECHAT_SCRIPT_HASHTABLE_DEFAULT_SIZE,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_STRING);
+
result = weechat_string_eval_path_home ((const char *)path,
pointers,
extra_vars,
options);
+ if (pointers)
+ weechat_hashtable_free (pointers);
+ if (extra_vars)
+ weechat_hashtable_free (extra_vars);
+ if (options)
+ weechat_hashtable_free (options);
+
API_RETURN_STRING_FREE(result);
}
@@ -1876,8 +1892,12 @@ API_FUNC(key_bind)
WEECHAT_SCRIPT_HASHTABLE_DEFAULT_SIZE,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_STRING);
+
result = weechat_key_bind ((const char *)context, keys);
+ if (keys)
+ weechat_hashtable_free (keys);
+
API_RETURN_INT(result);
}
@@ -2427,6 +2447,9 @@ API_FUNC(hook_process_hashtable)
(const char *)callback_name,
(const char *)data));
+ if (options)
+ weechat_hashtable_free (options);
+
API_RETURN_STRING(result);
}
@@ -2746,8 +2769,12 @@ API_FUNC(hook_hsignal_send)
WEECHAT_SCRIPT_HASHTABLE_DEFAULT_SIZE,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_STRING);
+
result = weechat_hook_hsignal_send ((const char *)signal, hashtable);
+ if (hashtable)
+ weechat_hashtable_free (hashtable);
+
API_RETURN_INT(result);
}
@@ -4154,8 +4181,12 @@ API_FUNC(info_get_hashtable)
WEECHAT_SCRIPT_HASHTABLE_DEFAULT_SIZE,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_STRING);
+
result = weechat_info_get_hashtable ((const char *)info_name, hashtable);
+ if (hashtable)
+ weechat_hashtable_free (hashtable);
+
weechat_php_hashtable_to_array (result, return_value);
}
@@ -4894,8 +4925,12 @@ API_FUNC(hdata_update)
WEECHAT_SCRIPT_HASHTABLE_DEFAULT_SIZE,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_STRING);
+
result = weechat_hdata_update (hdata, pointer, hashtable);
+ if (hashtable)
+ weechat_hashtable_free (hashtable);
+
API_RETURN_INT(result);
}