From 426796c9a3ba95ee6c39a80109beccd74ca0f65b Mon Sep 17 00:00:00 2001 From: aaron <> Date: Wed, 11 Jul 2001 16:11:10 +0000 Subject: [PATCH] Plug memory leak in pw_copy(); millert@ ok --- src/lib/libutil/passwd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/libutil/passwd.c b/src/lib/libutil/passwd.c index a3a2f534..ea86b1e1 100644 --- a/src/lib/libutil/passwd.c +++ b/src/lib/libutil/passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: passwd.c,v 1.25 2001/07/09 07:04:40 deraadt Exp $ */ +/* $OpenBSD: passwd.c,v 1.26 2001/07/11 16:11:10 aaron Exp $ */ /* * Copyright (c) 1987, 1993, 1994, 1995 @@ -34,7 +34,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: passwd.c,v 1.25 2001/07/09 07:04:40 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: passwd.c,v 1.26 2001/07/11 16:11:10 aaron Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -485,6 +485,7 @@ pw_copy(ffd, tfd, pw) if (ferror(to)) err: pw_error(NULL, 0, 1); + free(master); (void)fclose(to); }