mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-25 02:32:27 -05:00
Fix some leaks
This commit is contained in:
parent
72f82d096c
commit
d6e3f740bc
@ -1778,6 +1778,8 @@ hexchat_pluginpref_set_str_real (hexchat_plugin *pl, const char *var, const char
|
|||||||
{
|
{
|
||||||
g_free (confname);
|
g_free (confname);
|
||||||
g_free (confname_tmp);
|
g_free (confname_tmp);
|
||||||
|
if (fpIn)
|
||||||
|
fclose (fpIn);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if (fpIn == NULL) /* no previous config file, no parsing */
|
else if (fpIn == NULL) /* no previous config file, no parsing */
|
||||||
|
@ -1975,9 +1975,11 @@ pevt_build_string (const char *input, char **output, int *max_arg)
|
|||||||
|
|
||||||
a_len_error:
|
a_len_error:
|
||||||
fe_message ("String ends in $a", FE_MSG_WARN);
|
fe_message ("String ends in $a", FE_MSG_WARN);
|
||||||
|
free (i);
|
||||||
return 1;
|
return 1;
|
||||||
a_range_error:
|
a_range_error:
|
||||||
fe_message ("$a value is greater than 255", FE_MSG_WARN);
|
fe_message ("$a value is greater than 255", FE_MSG_WARN);
|
||||||
|
free (i);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (d == 't')
|
if (d == 't')
|
||||||
@ -2001,6 +2003,7 @@ pevt_build_string (const char *input, char **output, int *max_arg)
|
|||||||
{
|
{
|
||||||
snprintf (o, sizeof (o), "Error, invalid argument $%c\n", d);
|
snprintf (o, sizeof (o), "Error, invalid argument $%c\n", d);
|
||||||
fe_message (o, FE_MSG_WARN);
|
fe_message (o, FE_MSG_WARN);
|
||||||
|
free (i);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
d -= '0';
|
d -= '0';
|
||||||
@ -2067,6 +2070,8 @@ pevt_build_string (const char *input, char **output, int *max_arg)
|
|||||||
*max_arg = max;
|
*max_arg = max;
|
||||||
if (output)
|
if (output)
|
||||||
*output = obuf;
|
*output = obuf;
|
||||||
|
else
|
||||||
|
free (obuf);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user