mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 07:38:54 +02:00
girepository: Fix leak in prefix_with_context
Found by Coverity. https://bugzilla.redhat.com/show_bug.cgi?id=1938731
This commit is contained in:
committed by
Emmanuele Bassi
parent
3ebf2f5140
commit
18745a0639
@@ -2139,7 +2139,7 @@ prefix_with_context (GError **error,
|
|||||||
const char *section,
|
const char *section,
|
||||||
ValidateContext *ctx)
|
ValidateContext *ctx)
|
||||||
{
|
{
|
||||||
GString *str = g_string_new (NULL);
|
GString *str;
|
||||||
GSList *link;
|
GSList *link;
|
||||||
char *buf;
|
char *buf;
|
||||||
|
|
||||||
@@ -2150,6 +2150,8 @@ prefix_with_context (GError **error,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
str = g_string_new (NULL);
|
||||||
|
|
||||||
for (; link; link = link->next)
|
for (; link; link = link->next)
|
||||||
{
|
{
|
||||||
g_string_append (str, link->data);
|
g_string_append (str, link->data);
|
||||||
|
Reference in New Issue
Block a user