[COMMITTED] write_archive_locales: Fix memory leak

Message ID 20210511122802.286782-1-siddhesh@sourceware.org
State Committed
Commit 213573f86eae0b5ff70a4f71ed6f809aa76991f5
Headers
Series [COMMITTED] write_archive_locales: Fix memory leak |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Siddhesh Poyarekar May 11, 2021, 12:28 p.m. UTC
  Fix memory leak identified by coverity.
---
 locale/programs/locale.c | 2 ++
 1 file changed, 2 insertions(+)
  

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;
     }