diff options
author | Berke Viktor <berkeviktor@aol.com> | 2011-11-30 02:18:18 +0100 |
---|---|---|
committer | Berke Viktor <berkeviktor@aol.com> | 2011-11-30 02:18:18 +0100 |
commit | e2fa2d47872d8d3111996e9d3d96b326fd316904 (patch) | |
tree | c1d2c16b2e7a09b90d59365df7b10c1ee6aaa194 | |
parent | 14c7027d5296585af5cbd16c8fb5ab9f6fe44c30 (diff) |
fix some memory leaks
-rw-r--r-- | src/common/plugin.c | 3 |
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; } |