diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-11-11 23:49:02 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-11-11 23:49:02 +0000 |
commit | cced514271951e117cb56f06ee60f0a8a9dec51f (patch) | |
tree | bfce43881dd5680f63574b1940e3181a8cab666d /usr.bin/cap_mkdb/getinfo.c | |
parent | 231e7a5484a8f574e02b352fad12963a95846f03 (diff) |
Fix memory leaks found by parfait.
ok deraadt@ jsg@
Diffstat (limited to 'usr.bin/cap_mkdb/getinfo.c')
-rw-r--r-- | usr.bin/cap_mkdb/getinfo.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/cap_mkdb/getinfo.c b/usr.bin/cap_mkdb/getinfo.c index 5133de1aa6f..bc263658027 100644 --- a/usr.bin/cap_mkdb/getinfo.c +++ b/usr.bin/cap_mkdb/getinfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getinfo.c,v 1.15 2009/10/27 23:59:36 deraadt Exp $ */ +/* $OpenBSD: getinfo.c,v 1.16 2009/11/11 23:49:01 nicm Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -303,8 +303,10 @@ getent(char **cap, u_int *len, char **db_array, int fd, char *name, int depth) break; } - if (!foundit) + if (!foundit) { + free(record); return (-1); + } /* * Got the capability record, but now we have to expand all use=name |