diff options
author | flipk <flipk@cvs.openbsd.org> | 1997-03-18 06:36:52 +0000 |
---|---|---|
committer | flipk <flipk@cvs.openbsd.org> | 1997-03-18 06:36:52 +0000 |
commit | ed65e3b6840f9a66291e74126e535c3e9616c450 (patch) | |
tree | 7fc4dc5e3984dca7864bbb95b9a87d67d0913344 /lib/libc/md | |
parent | e810b3edcac8bfce2aed8c20ce0936f82938071e (diff) |
fix a memory-leak problem in MDXEnd -- even when given
a non-NULL buffer, MDXEnd would go ahead and malloc a new one anyway.
Diffstat (limited to 'lib/libc/md')
-rw-r--r-- | lib/libc/md/mdXhl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/md/mdXhl.c b/lib/libc/md/mdXhl.c index f44d5940d52..6f5498021fe 100644 --- a/lib/libc/md/mdXhl.c +++ b/lib/libc/md/mdXhl.c @@ -8,7 +8,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: mdXhl.c,v 1.5 1996/11/24 02:25:59 niklas Exp $"; +static char rcsid[] = "$OpenBSD: mdXhl.c,v 1.6 1997/03/18 06:36:51 flipk Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdlib.h> @@ -27,7 +27,7 @@ MDXEnd(ctx, buf) char *buf; { int i; - char *p = malloc(33); + char *p = buf; unsigned char digest[16]; static const char hex[]="0123456789abcdef"; |