diff options
author | Yu Jiung <jiung.yu@samsung.com> | 2016-11-09 11:15:33 +0900 |
---|---|---|
committer | Yu Jiung <jiung.yu@samsung.com> | 2016-11-09 11:15:43 +0900 |
commit | b6627e2c19506bd30328969ea8aab73fa0945f36 (patch) | |
tree | 24b768763efadd60f318873601e58dd98fe9714c /ares_destroy.c | |
parent | b8e6c26b7b9608dffc84645f17fe4cf534af18dd (diff) | |
download | c-ares-b6627e2c19506bd30328969ea8aab73fa0945f36.tar.gz c-ares-b6627e2c19506bd30328969ea8aab73fa0945f36.tar.bz2 c-ares-b6627e2c19506bd30328969ea8aab73fa0945f36.zip |
Imported Upstream version 1.10.0
Change-Id: Ic7f3b0ad7dca62abe4cfa642a5eb5e190eb7a8c9
Diffstat (limited to 'ares_destroy.c')
-rw-r--r-- | ares_destroy.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ares_destroy.c b/ares_destroy.c index 5e274da..6c1f324 100644 --- a/ares_destroy.c +++ b/ares_destroy.c @@ -1,6 +1,6 @@ /* Copyright 1998 by the Massachusetts Institute of Technology. - * Copyright (C) 2004-2010 by Daniel Stenberg + * Copyright (C) 2004-2011 by Daniel Stenberg * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without @@ -16,8 +16,9 @@ */ #include "ares_setup.h" + #include <assert.h> -#include <stdlib.h> + #include "ares.h" #include "ares_private.h" @@ -29,10 +30,12 @@ void ares_destroy_options(struct ares_options *options) free(options->servers); for (i = 0; i < options->ndomains; i++) free(options->domains[i]); - free(options->domains); + if(options->domains) + free(options->domains); if(options->sortlist) free(options->sortlist); - free(options->lookups); + if(options->lookups) + free(options->lookups); } void ares_destroy(ares_channel channel) |