mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +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,
|
||||
ValidateContext *ctx)
|
||||
{
|
||||
GString *str = g_string_new (NULL);
|
||||
GString *str;
|
||||
GSList *link;
|
||||
char *buf;
|
||||
|
||||
@@ -2150,6 +2150,8 @@ prefix_with_context (GError **error,
|
||||
return;
|
||||
}
|
||||
|
||||
str = g_string_new (NULL);
|
||||
|
||||
for (; link; link = link->next)
|
||||
{
|
||||
g_string_append (str, link->data);
|
||||
|
Reference in New Issue
Block a user