Fix a memleak

An early exit in expand_application_parameters forgot to free
a GString. Reported by Steve Grubb.
(cherry picked from commit b00c6d7fb5798b4e528554e1221a553ab95506ed)
This commit is contained in:
Matthias Clasen 2010-01-05 18:18:55 -05:00
parent 6a8828d40f
commit aecd2616c7

View File

@ -701,7 +701,7 @@ expand_application_parameters (GDesktopAppInfo *info,
{
GList *uri_list = *uris;
const char *p = info->exec;
GString *expanded_exec = g_string_new (NULL);
GString *expanded_exec;
gboolean res;
if (info->exec == NULL)
@ -711,6 +711,8 @@ expand_application_parameters (GDesktopAppInfo *info,
return FALSE;
}
expanded_exec = g_string_new (NULL);
while (*p)
{
if (p[0] == '%' && p[1] != '\0')