diff options
author | Mike Pechkin <mpech@cvs.openbsd.org> | 2002-03-20 17:17:16 +0000 |
---|---|---|
committer | Mike Pechkin <mpech@cvs.openbsd.org> | 2002-03-20 17:17:16 +0000 |
commit | beb702310f231cfc5654d123b90c1905ae7175ba (patch) | |
tree | 282cdf70483e778129723ffc13c13f82cc6d618a /lib/libc/gen | |
parent | cba6c304206d900051cb456dc17b91e07d2d5ab9 (diff) |
fix memleak.
millert@ ok
Diffstat (limited to 'lib/libc/gen')
-rw-r--r-- | lib/libc/gen/authenticate.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libc/gen/authenticate.c b/lib/libc/gen/authenticate.c index bfc16b594ee..9aaba58253e 100644 --- a/lib/libc/gen/authenticate.c +++ b/lib/libc/gen/authenticate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authenticate.c,v 1.8 2002/03/13 21:39:41 millert Exp $ */ +/* $OpenBSD: authenticate.c,v 1.9 2002/03/20 17:17:15 mpech Exp $ */ /*- * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved. @@ -236,6 +236,7 @@ auth_approval(auth_session_t *as, login_cap_t *lc, char *name, char *type) login_close(lc); syslog(LOG_ERR, "Invalid %s script: %s", s, approve); _warnx("invalid path to approval script"); + free(approve); return (0); } @@ -244,6 +245,8 @@ auth_approval(auth_session_t *as, login_cap_t *lc, char *name, char *type) login_close(lc); syslog(LOG_ERR, "%m"); _warn(NULL); + if (approve) + free(approve); return (0); } @@ -277,6 +280,8 @@ auth_approval(auth_session_t *as, login_cap_t *lc, char *name, char *type) lc->lc_class, type, 0); out: + if (approve) + free(approve); if (close_lc_on_exit) login_close(lc); |