mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-29 02:26:34 +02:00
Fix a memleak
An early exit in expand_application_parameters forgot to free
a GString. Reported by Steve Grubb.
(cherry picked from commit b00c6d7fb5
)
This commit is contained in:
@@ -701,7 +701,7 @@ expand_application_parameters (GDesktopAppInfo *info,
|
|||||||
{
|
{
|
||||||
GList *uri_list = *uris;
|
GList *uri_list = *uris;
|
||||||
const char *p = info->exec;
|
const char *p = info->exec;
|
||||||
GString *expanded_exec = g_string_new (NULL);
|
GString *expanded_exec;
|
||||||
gboolean res;
|
gboolean res;
|
||||||
|
|
||||||
if (info->exec == NULL)
|
if (info->exec == NULL)
|
||||||
@@ -711,6 +711,8 @@ expand_application_parameters (GDesktopAppInfo *info,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
expanded_exec = g_string_new (NULL);
|
||||||
|
|
||||||
while (*p)
|
while (*p)
|
||||||
{
|
{
|
||||||
if (p[0] == '%' && p[1] != '\0')
|
if (p[0] == '%' && p[1] != '\0')
|
||||||
|
Reference in New Issue
Block a user