aboutsummaryrefslogtreecommitdiff
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
commit93dde299798aca8a59cf4c8e4c5ada05000ead81 (patch)
tree37189fc8a6dcb7d1cc53d9b1074652c59c888eff
parentd42dcd60cd4a099bcf17cd5686669708d5bb418c (diff)
don't free(NULL)
-rw-r--r--ares/ares_init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ares/ares_init.c b/ares/ares_init.c
index 444fd8a66..41598e6ed 100644
--- a/ares/ares_init.c
+++ b/ares/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;
}