diff options
author | 2010-10-22 10:22:20 -0600 | |
---|---|---|
committer | 2010-10-22 10:22:20 -0600 | |
commit | 24a2663f70e336326d6054c626934927fd2a9528 (patch) | |
tree | 18cd30dcae971f857d7644e8ca19a15c6bafc0bd | |
parent | docs: added a table of contents to the new c sharp bindings page (diff) | |
download | libvirt-24a2663f70e336326d6054c626934927fd2a9528.tar.gz libvirt-24a2663f70e336326d6054c626934927fd2a9528.tar.bz2 libvirt-24a2663f70e336326d6054c626934927fd2a9528.zip |
dnsmasq: avoid potential crash
* src/util/dnsmasq.c (hostsfileAdd): Don't free uninitialized
memory on allocation failure.
-rw-r--r-- | src/util/dnsmasq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/dnsmasq.c b/src/util/dnsmasq.c index 2cb25bf8f..3c0506cda 100644 --- a/src/util/dnsmasq.c +++ b/src/util/dnsmasq.c @@ -79,7 +79,7 @@ hostsfileAdd(dnsmasqHostsfile *hostsfile, virSocketAddr *ip, const char *name) { - char *ipstr; + char *ipstr = NULL; if (VIR_REALLOC_N(hostsfile->hosts, hostsfile->nhosts + 1) < 0) goto alloc_error; |