summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorBerke Viktor <berkeviktor@aol.com>2011-11-30 02:18:18 +0100
committerBerke Viktor <berkeviktor@aol.com>2011-11-30 02:18:18 +0100
commite2fa2d47872d8d3111996e9d3d96b326fd316904 (patch)
treec1d2c16b2e7a09b90d59365df7b10c1ee6aaa194 /src/common
parent14c7027d5296585af5cbd16c8fb5ab9f6fe44c30 (diff)
fix some memory leaks
Diffstat (limited to 'src/common')
-rw-r--r--src/common/plugin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/plugin.c b/src/common/plugin.c
index 96510265..7bc39400 100644
--- a/src/common/plugin.c
+++ b/src/common/plugin.c
@@ -1698,6 +1698,7 @@ xchat_get_plugin_pref (xchat_plugin *pl, char *var, char *dest)
 
 	if (!cfg)
 	{
+		close (fh);
 		return 0;
 	}
 
@@ -1711,6 +1712,8 @@ xchat_get_plugin_pref (xchat_plugin *pl, char *var, char *dest)
 
 	if (!cfg_get_str (cfg, var, dest, 512)) /* dest_len is the same as buffer size in set */
 	{
+		free (cfg);
+		close (fh);
 		return 0;
 	}