mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01: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:
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);
|
||||
|
Loading…
Reference in New Issue
Block a user