ares_destroy.c: fix segfault in ares_destroy_options()

pull/7/head
Yang Tse 13 years ago
parent d0c3cb6840
commit b816675c0f
  1. 4
      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
@ -29,9 +29,11 @@ void ares_destroy_options(struct ares_options *options)
free(options->servers);
for (i = 0; i < options->ndomains; i++)
free(options->domains[i]);
if(options->domains)
free(options->domains);
if(options->sortlist)
free(options->sortlist);
if(options->lookups)
free(options->lookups);
}

Loading…
Cancel
Save