diff options
author | Michal Sekletar <msekleta@redhat.com> | 2012-10-26 14:15:00 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-10-28 02:14:40 +0200 |
commit | 2f7a4867babd3fd382e5495f21724358f30fa67d (patch) | |
tree | c21bc3b0ba6bb8f8a499b2b2cd3620f0a18cf9e1 | |
parent | 4a207bb2a5eca181209ca273c76e32bcc90c99c8 (diff) |
localectl: fix memleak, jump to finish before returning
-rw-r--r-- | src/locale/localectl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/locale/localectl.c b/src/locale/localectl.c index c05eba0d3e..84feb25d52 100644 --- a/src/locale/localectl.c +++ b/src/locale/localectl.c @@ -354,7 +354,8 @@ static int list_locales(DBusConnection *bus, char **args, unsigned n) { h->locrectab_offset + h->locrectab_size > st.st_size || h->sumhash_offset + h->sumhash_size > st.st_size) { log_error("Invalid archive file."); - return -EBADMSG; + r = -EBADMSG; + goto finish; } e = (const struct namehashent*) ((const uint8_t*) p + h->namehash_offset); |