summary refs log tree commit diff stats
path: root/src/common/plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/plugin.c')
-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;
 	}