changeset 9667:22928adecb84

[gaim-migrate @ 10519] Fixed a memory leak in plugin IPC registering. Although the parameter value types were all being freed when a command was unregistered, the arrays holding them were not. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 05 Aug 2004 01:32:00 +0000
parents 14c1ffd053e5
children c6687793767f
files src/plugin.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugin.c	Wed Aug 04 23:39:24 2004 +0000
+++ b/src/plugin.c	Thu Aug 05 01:32:00 2004 +0000
@@ -565,8 +565,13 @@
 	GaimPluginIpcCommand *ipc_command = (GaimPluginIpcCommand *)data;
 	int i;
 
-	for (i = 0; i < ipc_command->num_params; i++)
-		gaim_value_destroy(ipc_command->params[i]);
+	if (ipc_command->params != NULL)
+	{
+		for (i = 0; i < ipc_command->num_params; i++)
+			gaim_value_destroy(ipc_command->params[i]);
+
+		g_free(ipc_command->params);
+	}
 
 	if (ipc_command->ret_value != NULL)
 		gaim_value_destroy(ipc_command->ret_value);