------------------------------------------------------------
revno: 5
committer: poy <[email protected]>
branch nick: dcpp-plugin-sdk-c
timestamp: Thu 2012-12-27 22:18:53 +0100
message:
plug a leak
modified:
pluginsdk/Config.c
pluginsdk/Config.h
src/Plugin.c
--
lp:dcpp-plugin-sdk-c
https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-c/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcpp-plugin-sdk-c.
To unsubscribe from this branch go to
https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-c/trunk/+edit-subscription
=== modified file 'pluginsdk/Config.c'
--- pluginsdk/Config.c 2012-12-27 14:49:19 +0000
+++ pluginsdk/Config.c 2012-12-27 21:18:53 +0000
@@ -36,6 +36,10 @@
return config ? True : False;
}
+void DCAPI uninit_cfg() {
+ free(guid);
+}
+
char* DCAPI get_cfg(const char* name) {
ConfigStrPtr val = (ConfigStrPtr)config->get_cfg(guid, name, CFG_TYPE_STRING);
int len = strlen(val->value) + 1;
=== modified file 'pluginsdk/Config.h'
--- pluginsdk/Config.h 2012-12-27 14:49:19 +0000
+++ pluginsdk/Config.h 2012-12-27 21:18:53 +0000
@@ -24,6 +24,7 @@
#include <pluginsdk/PluginDefs.h>
Bool DCAPI init_cfg(DCCorePtr core, const char* pluginGuid);
+void DCAPI uninit_cfg();
char* DCAPI get_cfg(const char* name);
int32_t DCAPI get_cfg_int(const char* name);
=== modified file 'src/Plugin.c'
--- src/Plugin.c 2012-12-27 14:49:19 +0000
+++ src/Plugin.c 2012-12-27 21:18:53 +0000
@@ -102,5 +102,8 @@
if(subs[i]) hooks->release_hook(subs[i]);
++i;
}
+
+ uninit_cfg();
+
return True;
}
_______________________________________________
Mailing list: https://launchpad.net/~linuxdcpp-team
Post to : [email protected]
Unsubscribe : https://launchpad.net/~linuxdcpp-team
More help : https://help.launchpad.net/ListHelp