aboutsummaryrefslogtreecommitdiff
path: root/libiberty/argv.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2021-07-03 14:00:33 +0100
committerNick Clifton <nickc@redhat.com>2021-07-03 14:00:33 +0100
commit20c4b12e937b20f0998bd25ad37c77145650e826 (patch)
treebcc05850ae7ed90cedb0368ab7f8b3a88a703500 /libiberty/argv.c
parent0d03c52682bec990371b2f006e186641cf86f923 (diff)
downloadgdb-20c4b12e937b20f0998bd25ad37c77145650e826.zip
gdb-20c4b12e937b20f0998bd25ad37c77145650e826.tar.gz
gdb-20c4b12e937b20f0998bd25ad37c77145650e826.tar.bz2
Synchronize libiberty sources (and include/demangle.h) with GCC master version
Diffstat (limited to 'libiberty/argv.c')
-rw-r--r--libiberty/argv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libiberty/argv.c b/libiberty/argv.c
index cd97f90..48dcd10 100644
--- a/libiberty/argv.c
+++ b/libiberty/argv.c
@@ -442,7 +442,10 @@ expandargv (int *argcp, char ***argvp)
due to CR/LF->CR translation when reading text files.
That does not in-and-of itself indicate failure. */
&& ferror (f))
- goto error;
+ {
+ free (buffer);
+ goto error;
+ }
/* Add a NUL terminator. */
buffer[len] = '\0';
/* If the file is empty or contains only whitespace, buildargv would