aboutsummaryrefslogtreecommitdiff
path: root/gdb/charset.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/charset.c')
-rw-r--r--gdb/charset.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gdb/charset.c b/gdb/charset.c
index 4a209a5..89baf46 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -909,11 +909,8 @@ find_charset_names (void)
if (fail)
{
/* Some error occurred, so drop the vector. */
- int ix;
- char *elt;
- for (ix = 0; VEC_iterate (char_ptr, charsets, ix, elt); ++ix)
- xfree (elt);
- VEC_truncate (char_ptr, charsets, 0);
+ free_char_ptr_vec (charsets);
+ charsets = NULL;
}
else
VEC_safe_push (char_ptr, charsets, NULL);