summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2017-01-11 17:15:55 +0000
committerPhilip Withnall <withnall@endlessm.com>2017-01-12 09:04:39 +0000
commit2c35acff7b65bd7b794e72c43e3056d113686307 (patch)
tree840efa14faa33f115051a5a6c721e44bcbc61c3e
parent88e977266b92516b15f384e3990d90af557e0574 (diff)
downloadglib-2c35acff7b65bd7b794e72c43e3056d113686307.tar.gz
gregex: Fix an assignment-after-free error
The match_info is freed just above this line, so this would result in a write to freed memory. Spotted by Leslie Zhai <xiangzhai83@gmail.com>. https://bugzilla.gnome.org/show_bug.cgi?id=777077
-rw-r--r--glib/gregex.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/glib/gregex.c b/glib/gregex.c
index 76a5104db..a9f6814e2 100644
--- a/glib/gregex.c
+++ b/glib/gregex.c
@@ -2294,7 +2294,6 @@ g_regex_split_full (const GRegex *regex,
{
g_propagate_error (error, tmp_error);
g_list_free_full (list, g_free);
- match_info->pos = -1;
return NULL;
}