diff options
author | Joel E. Denny <jdenny@clemson.edu> | 2009-12-15 10:07:39 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-12-15 10:18:30 +0100 |
commit | 2c0087ea00a28c65a7b118aaa00e768dcf5886ad (patch) | |
tree | acb36819524e99625628fc1685ba5eb603e46bae /lib/dprintf.c | |
parent | 25552e29ba625a744cabd0978bdc2349b909b671 (diff) | |
download | gnulib-2c0087ea00a28c65a7b118aaa00e768dcf5886ad.tar.gz |
*printf: Fix memory leak.
Diffstat (limited to 'lib/dprintf.c')
-rw-r--r-- | lib/dprintf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/dprintf.c b/lib/dprintf.c index 70f992f0e5..99ee6af7f3 100644 --- a/lib/dprintf.c +++ b/lib/dprintf.c @@ -57,6 +57,9 @@ dprintf (int fd, const char *format, ...) return -1; } + if (output != buf) + free (output); + if (len > INT_MAX) { errno = EOVERFLOW; |