[COMMITTED] write_archive_locales: Fix memory leak

Message ID 20210511122802.286782-1-siddhesh@sourceware.org
State New
Headers show
Series
  • [COMMITTED] write_archive_locales: Fix memory leak
Related show

Commit Message

Adhemerval Zanella via Libc-alpha May 11, 2021, 12:28 p.m.
Fix memory leak identified by coverity.
---
 locale/programs/locale.c | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.31.1

Patch

diff --git a/locale/programs/locale.c b/locale/programs/locale.c
index 575b208e82..ca0a95be99 100644
--- a/locale/programs/locale.c
+++ b/locale/programs/locale.c
@@ -713,6 +713,8 @@  write_archive_locales (void **all_datap, char *linebuf)
 			  locrec->record[LC_CTYPE].len);
 	}
 
+      free (names);
+
       ret = used;
     }