From: Michal Sekletar Date: Fri, 26 Oct 2012 12:15:00 +0000 (+0200) Subject: localectl: fix memleak, jump to finish before returning X-Git-Tag: v196~203 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=2f7a4867babd3fd382e5495f21724358f30fa67d;p=elogind.git localectl: fix memleak, jump to finish before returning --- diff --git a/src/locale/localectl.c b/src/locale/localectl.c index c05eba0d3..84feb25d5 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);