From: Brian Behlendorf Date: Wed, 28 Mar 2007 13:50:33 +0000 (-0400) Subject: [COVERITY] Fix memory leak in tune2fs and mke2fs when parsing journal options X-Git-Tag: E2FSPROGS-1_40~92 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=45415c2dc1975efef329002133549895c57dbc1e;p=tools%2Fe2fsprogs.git [COVERITY] Fix memory leak in tune2fs and mke2fs when parsing journal options Coverity ID: 33: Resource Leak Signed-off-by: Brian Behlendorf Signed-off-by: "Theodore Ts'o" --- diff --git a/misc/ChangeLog b/misc/ChangeLog index bf7a8c8..9a9cd1b 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,5 +1,7 @@ 2007-03-28 Theodore Tso + * util.c (parse_journal_opts): Fix memory leak + * fsck.c (execute): Fix memory leak on error paths 2007-03-21 Theodore Tso diff --git a/misc/util.c b/misc/util.c index 57ce2b3..0ea6cb4 100644 --- a/misc/util.c +++ b/misc/util.c @@ -234,8 +234,10 @@ void parse_journal_opts(const char *opts) "\tdevice=\n\n" "The journal size must be between " "1024 and 102400 filesystem blocks.\n\n"), stderr); + free(buf); exit(1); } + free(buf); } /*