diff options
author | 2003-06-19 07:21:20 +0000 | |
---|---|---|
committer | 2003-06-19 07:21:20 +0000 | |
commit | 07422ee830dbaa55dcf0ac7647abe949139f2ec9 (patch) | |
tree | f5cd85cb8ff477784ba8f718815fffe1224b2c52 | |
parent | remove unused code which allocated useless memory (which was not freed) (diff) | |
download | wireguard-openbsd-07422ee830dbaa55dcf0ac7647abe949139f2ec9.tar.xz wireguard-openbsd-07422ee830dbaa55dcf0ac7647abe949139f2ec9.zip |
plug memory leak; ok solar, camield
-rw-r--r-- | usr.sbin/popa3d/virtual.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/popa3d/virtual.c b/usr.sbin/popa3d/virtual.c index 0d4da4f43aa..3ec70d7d535 100644 --- a/usr.sbin/popa3d/virtual.c +++ b/usr.sbin/popa3d/virtual.c @@ -1,4 +1,4 @@ -/* $OpenBSD: virtual.c,v 1.4 2003/04/02 00:07:53 deraadt Exp $ */ +/* $OpenBSD: virtual.c,v 1.5 2003/06/19 07:21:20 pvalchev Exp $ */ /* * Virtual domain support. @@ -117,7 +117,10 @@ struct passwd *virtual_userpass(char *user, char *pass, int *known) return NULL; } - if (!(address = strdup(address))) return NULL; + if (!(address = strdup(address))) { + free(pathname); + return NULL; + } virtual_domain = address; free(pathname); |