diff options
| -rw-r--r-- | usr.bin/cap_mkdb/getinfo.c | 6 | ||||
| -rw-r--r-- | usr.bin/tset/tset.c | 3 |
2 files changed, 6 insertions, 3 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 diff --git a/usr.bin/tset/tset.c b/usr.bin/tset/tset.c index 632d5c33f58..ea52ccc099b 100644 --- a/usr.bin/tset/tset.c +++ b/usr.bin/tset/tset.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tset.c,v 1.33 2009/05/06 21:07:01 sobrado Exp $ */ +/* $OpenBSD: tset.c,v 1.34 2009/11/11 23:49:01 nicm Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -417,6 +417,7 @@ add_mapping(const char *port, char *arg) badmopt:err("illegal -m option format: %s", copy); mapp->porttype = port; } + free(copy); #ifdef MAPDEBUG (void) printf("port: %s\n", mapp->porttype ? mapp->porttype : "ANY"); (void) printf("type: %s\n", mapp->type); |
