]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
show_archive_content: Fix trivial memory leak
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Tue, 18 May 2021 03:37:06 +0000 (09:07 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Tue, 18 May 2021 03:37:06 +0000 (09:07 +0530)
Fix trivial leak identified by coverity.  The program runs to exit and
the leak doesn't grow, but it's just cleaner to free the allocated
memory.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
locale/programs/locarchive.c

index 6bb189ae375c01f567bdcf5d5b837541de2c3177..f38e835c52e4a967ef9b546db8077d9e53694c94 100644 (file)
@@ -1742,6 +1742,7 @@ show_archive_content (const char *fname, int verbose)
                        : locnames[idx]);
              }
        }
+      free (files);
     }
   else
     for (cnt = 0; cnt < used; ++cnt)