From: Jim Meyering Date: Mon, 18 Jan 2010 07:02:05 +0000 (+0100) Subject: libstdbuf: plug a very unlikely leak X-Git-Tag: v8.5~99 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=31423c76e8e6885659141535a2a5fd9e3b4c503e;p=thirdparty%2Fcoreutils.git libstdbuf: plug a very unlikely leak * src/libstdbuf.c (apply_mode): Don't leak "buf" upon setvbuf failure. --- diff --git a/src/libstdbuf.c b/src/libstdbuf.c index 2ef848f86b..50eebb12c0 100644 --- a/src/libstdbuf.c +++ b/src/libstdbuf.c @@ -123,6 +123,7 @@ apply_mode (FILE *stream, const char *mode) { fprintf (stderr, _("could not set buffering of %s to mode %s\n"), fileno_to_name (fileno (stream)), mode); + free (buf); } }