diff options
author | zinovik <zinovik@cvs.openbsd.org> | 2010-03-30 17:10:38 +0000 |
---|---|---|
committer | zinovik <zinovik@cvs.openbsd.org> | 2010-03-30 17:10:38 +0000 |
commit | f5972d809904e97326ca314c087612469e208db2 (patch) | |
tree | e8fd475e85fd331716fd29b8b0a2060d96fa1ecb /usr.sbin/amd | |
parent | 1e43324a1250a9a2ba1ae3f31e7a7b05fb04ca06 (diff) |
After snprintf(3) call `dir' is no longer used so free it also on normal
code path.
ok deraadt@
Diffstat (limited to 'usr.sbin/amd')
-rw-r--r-- | usr.sbin/amd/amd/info_passwd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/amd/amd/info_passwd.c b/usr.sbin/amd/amd/info_passwd.c index e44b052d9ab..22eb8c77242 100644 --- a/usr.sbin/amd/amd/info_passwd.c +++ b/usr.sbin/amd/amd/info_passwd.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)info_passwd.c 8.1 (Berkeley) 6/6/93 - * $Id: info_passwd.c,v 1.7 2003/06/02 23:36:51 millert Exp $ + * $Id: info_passwd.c,v 1.8 2010/03/30 17:10:37 zinovik Exp $ */ /* @@ -136,6 +136,7 @@ passwd_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp) snprintf(val, sizeof(val), "rfs:=%s/%s;rhost:=%s;sublink:=%s;fs:=${autodir}%s", dir, rhost, rhost, user, pw->pw_dir); + free(dir); if (q) *q = '.'; *pval = strdup(val); |