diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-07-04 22:46:48 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-07-04 22:46:48 +0000 |
commit | f221546ae378002ecbe2e7aea2d61437023335c5 (patch) | |
tree | ccc93a0941e0fbe00354e99a5696b3ec2a1d3dad /libexec/spamd | |
parent | 1482730104e87dde8838a5d7ab2d0be64332e49f (diff) |
two missing freeaddrinfo() -- leak; andrushock@korovino.net
Diffstat (limited to 'libexec/spamd')
-rw-r--r-- | libexec/spamd/grey.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libexec/spamd/grey.c b/libexec/spamd/grey.c index fddf5d7d153..3563602f8d2 100644 --- a/libexec/spamd/grey.c +++ b/libexec/spamd/grey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grey.c,v 1.14 2004/06/21 17:07:01 itojun Exp $ */ +/* $OpenBSD: grey.c,v 1.15 2004/07/04 22:46:47 deraadt Exp $ */ /* * Copyright (c) 2004 Bob Beck. All rights reserved. @@ -164,14 +164,18 @@ addwhiteaddr(char *addr) tmp = realloc(whitelist, (whitealloc + 1024) * sizeof(char *)); - if (tmp == NULL) + if (tmp == NULL) { + freeaddrinfo(res); return(-1); + } whitelist = tmp; whitealloc += 1024; } whitelist[whitecount] = strdup(addr); - if (whitelist[whitecount] == NULL) + if (whitelist[whitecount] == NULL) { + freeaddrinfo(res); return(-1); + } whitecount++; freeaddrinfo(res); } else |