fix some memory leaks

This commit is contained in:
Berke Viktor 2011-11-30 02:18:18 +01:00
parent 14c7027d52
commit e2fa2d4787
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}