comparison src/plugin.c @ 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 bb168141eb5f
children f568b6655331
comparison
equal deleted inserted replaced
9666:14c1ffd053e5 9667:22928adecb84
563 destroy_ipc_info(void *data) 563 destroy_ipc_info(void *data)
564 { 564 {
565 GaimPluginIpcCommand *ipc_command = (GaimPluginIpcCommand *)data; 565 GaimPluginIpcCommand *ipc_command = (GaimPluginIpcCommand *)data;
566 int i; 566 int i;
567 567
568 for (i = 0; i < ipc_command->num_params; i++) 568 if (ipc_command->params != NULL)
569 gaim_value_destroy(ipc_command->params[i]); 569 {
570 for (i = 0; i < ipc_command->num_params; i++)
571 gaim_value_destroy(ipc_command->params[i]);
572
573 g_free(ipc_command->params);
574 }
570 575
571 if (ipc_command->ret_value != NULL) 576 if (ipc_command->ret_value != NULL)
572 gaim_value_destroy(ipc_command->ret_value); 577 gaim_value_destroy(ipc_command->ret_value);
573 578
574 g_free(ipc_command); 579 g_free(ipc_command);