mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-12-04 22:11:52 +00:00
fix some memory leaks
This commit is contained in:
1 parent
14c7027d52
commit
e2fa2d4787
1 file changed
+3
@@ -1698,6 +1698,7 @@ xchat_get_plugin_pref (xchat_plugin *pl, char *var, char *dest)
|
|||||||
|
|
||||||
if (!cfg)
|
if (!cfg)
|
||||||
{
|
{
|
||||||
|
close (fh);
|
||||||
return 0;
|
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 */
|
if (!cfg_get_str (cfg, var, dest, 512)) /* dest_len is the same as buffer size in set */
|
||||||
{
|
{
|
||||||
|
free (cfg);
|
||||||
|
close (fh);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user