Fix build error in gdb/rocm-tdep.c
[deliverable/binutils-gdb.git] / libiberty / argv.c
index 4f66c8979b2a5ee5fab8a62c9ea36682116e575a..6444896f995a8e4abfb6a1edc510f3a4bbe1a30b 100644 (file)
@@ -1,5 +1,5 @@
 /* Create and destroy argument vectors (argv's)
-   Copyright (C) 1992-2018 Free Software Foundation, Inc.
+   Copyright (C) 1992-2019 Free Software Foundation, Inc.
    Written by Fred Fish @ Cygnus Support
 
 This file is part of the libiberty library.
@@ -455,6 +455,8 @@ expandargv (int *argcp, char ***argvp)
       file_argc = 0;
       while (file_argv[file_argc])
        ++file_argc;
+      /* Free the original option's memory.  */
+      free ((*argvp)[i]);
       /* Now, insert FILE_ARGV into ARGV.  The "+1" below handles the
         NULL terminator at the end of ARGV.  */ 
       *argvp = ((char **) 
This page took 0.037977 seconds and 4 git commands to generate.