diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-05-27 11:48:07 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-05-27 11:48:07 +0000 |
commit | de2f374fe7d1fa1a4f182fcdeaa12a477b2b94d9 (patch) | |
tree | 7ff5c7cdee4502ae01e9ffbe4efd3f5d50c41d2c /sbin/pfctl | |
parent | 620e6af76df071b011f6ab8b4f41fb7d9b9a4ac0 (diff) |
plug memleak in error path
From: Andrey Matveev <andrushock@korovino.net>
Diffstat (limited to 'sbin/pfctl')
-rw-r--r-- | sbin/pfctl/pfctl_parser.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 47230181db7..d6b7be97c49 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_parser.c,v 1.199 2004/05/19 17:50:51 dhartmei Exp $ */ +/* $OpenBSD: pfctl_parser.c,v 1.200 2004/05/27 11:48:06 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1444,8 +1444,10 @@ host_dns(const char *s, int v4mask, int v6mask) hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_STREAM; /* DUMMY */ error = getaddrinfo(ps, NULL, &hints, &res0); - if (error) + if (error) { + free(ps); return (h); + } for (res = res0; res; res = res->ai_next) { if (res->ai_family != AF_INET && |