diff options
author | 2009-11-11 18:04:35 +0000 | |
---|---|---|
committer | 2009-11-11 18:04:35 +0000 | |
commit | 58c7af78fe5f698bbf6495458564bbb11c6c46a6 (patch) | |
tree | abab0be3d367d16d71a1fe57e1fbdadfaf3923cd | |
parent | correctly order the range check and use the right limits, pointed out by parfait (diff) | |
download | wireguard-openbsd-58c7af78fe5f698bbf6495458564bbb11c6c46a6.tar.xz wireguard-openbsd-58c7af78fe5f698bbf6495458564bbb11c6c46a6.zip |
memory leak with #ifdef SMALL, found by parfait
ok jsg
-rw-r--r-- | usr.bin/compress/gzopen.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/compress/gzopen.c b/usr.bin/compress/gzopen.c index 14c48595602..dd6b7d20905 100644 --- a/usr.bin/compress/gzopen.c +++ b/usr.bin/compress/gzopen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gzopen.c,v 1.25 2008/08/20 09:22:02 mpf Exp $ */ +/* $OpenBSD: gzopen.c,v 1.26 2009/11/11 18:04:35 deraadt Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -60,7 +60,7 @@ #ifndef SMALL const char gz_rcsid[] = - "$OpenBSD: gzopen.c,v 1.25 2008/08/20 09:22:02 mpf Exp $"; + "$OpenBSD: gzopen.c,v 1.26 2009/11/11 18:04:35 deraadt Exp $"; #endif #include <sys/param.h> @@ -146,6 +146,7 @@ gz_open(int fd, const char *mode, char *name, int bits, } s->z_stream.next_out = s->z_buf; #else + free(s); return (NULL); #endif } else { |