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
This commit is contained in:
Philip Withnall 2017-01-11 17:15:55 +00:00
parent 88e977266b
commit 2c35acff7b

View File

@ -2294,7 +2294,6 @@ g_regex_split_full (const GRegex *regex,
{ {
g_propagate_error (error, tmp_error); g_propagate_error (error, tmp_error);
g_list_free_full (list, g_free); g_list_free_full (list, g_free);
match_info->pos = -1;
return NULL; return NULL;
} }