summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-05-03 09:17:49 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-05-03 09:17:49 +0000
commit5ab993a1e0e57fe7bc9ecbfcf96513338bbd8975 (patch)
treea3231d82c8186bf3d9078967708d8f2c8d984522
parent727cd05fabb3ba29b02c19740c28d8ec21ec008f (diff)
downloadc-ares-5ab993a1e0e57fe7bc9ecbfcf96513338bbd8975.tar.gz
c-ares-5ab993a1e0e57fe7bc9ecbfcf96513338bbd8975.tar.bz2
c-ares-5ab993a1e0e57fe7bc9ecbfcf96513338bbd8975.zip
don't free(NULL)
-rw-r--r--ares_init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ares_init.c b/ares_init.c
index 444fd8a..41598e6 100644
--- a/ares_init.c
+++ b/ares_init.c
@@ -109,7 +109,8 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
}
if (channel->nsort != -1)
free(channel->sortlist);
- free(channel->lookups);
+ if(channel->lookups)
+ free(channel->lookups);
free(channel);
return status;
}