mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 03:02:10 +01:00
GOptionContext test: free all arguments, not just the remaining ones
On success, g_option_context_parse alters argv by removing options that it understood, so g_strfreev is insufficient. Instead, take a shallow copy and free all of the arguments in that, then free the array argv but not its contents. Also, improve the checks in error cases, by checking that argv has not been altered in this way. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666115 Reviewed-by: Matthias Clasen <mclasen@redhat.com>
This commit is contained in:
parent
29f2ced8eb
commit
5dca72fe67
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user