From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 1/3] lib/colors: remove memory leak
Date: Wed, 16 Jul 2014 21:54:56 +0100 [thread overview]
Message-ID: <1405544098-1740-1-git-send-email-kerolasa@iki.fi> (raw)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
lib/colors.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/colors.c b/lib/colors.c
index cb342a0..8de1d2f 100644
--- a/lib/colors.c
+++ b/lib/colors.c
@@ -425,9 +425,9 @@ static int colors_add_scheme(struct ul_color_ctl *cc,
return -EINVAL;
rc = cn_sequence(seq0, &seq);
+ free(seq0);
if (rc)
return rc;
- free(seq0);
/* convert logical name (e.g. "red") to real ESC code */
if (isalpha(*seq)) {
--
2.0.1
next reply other threads:[~2014-07-16 20:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-16 20:54 Sami Kerola [this message]
2014-07-16 20:54 ` [PATCH 2/3] fallocate: avoid unnecessary computation Sami Kerola
2014-07-16 20:54 ` [PATCH 3/3] fstrim: avoid TOCTOU race Sami Kerola
2014-07-17 12:02 ` [PATCH 1/3] lib/colors: remove memory leak Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1405544098-1740-1-git-send-email-kerolasa@iki.fi \
--to=kerolasa@iki.fi \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox