summaryrefslogtreecommitdiff
path: root/gobject-introspection
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2018-09-20 10:57:43 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2018-09-20 10:57:43 +0200
commit6cb5e13279ef649b443f763567ababb669d52a31 (patch)
tree41b20f18532c4de030575b93501bc303f8b60deb /gobject-introspection
parentde01c082135a0a34dd2ae8e58264e76fb82dec2b (diff)
downloadvala-6cb5e13279ef649b443f763567ababb669d52a31.tar.gz
g-i: Fix use after free in scanner
Fixes https://gitlab.gnome.org/GNOME/vala/issues/674
Diffstat (limited to 'gobject-introspection')
-rw-r--r--gobject-introspection/scannerparser.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/gobject-introspection/scannerparser.y b/gobject-introspection/scannerparser.y
index 47a97b601..2042bdc56 100644
--- a/gobject-introspection/scannerparser.y
+++ b/gobject-introspection/scannerparser.y
@@ -54,10 +54,10 @@ csymbol_new (CSymbolType type)
static void
ctype_free (CType * type)
{
- g_free (type);
g_free (type->name);
g_list_foreach (type->child_list, (GFunc)ctype_free, NULL);
g_list_free (type->child_list);
+ g_free (type);
}
void
@@ -66,9 +66,9 @@ csymbol_free (CSymbol * symbol)
g_free (symbol->ident);
ctype_free (symbol->base_type);
g_free (symbol->const_string);
- g_free (symbol);
g_slist_foreach (symbol->directives, (GFunc)cdirective_free, NULL);
g_slist_free (symbol->directives);
+ g_free (symbol);
}
gboolean