summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con/dns.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-12-13 09:41:23 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-12-13 09:41:23 +0900
commit675309d9d91fd8a21588e67944e2a3c702bf0983 (patch)
tree3c1143cc657fd1c8b0191b098f20768dd063ac92 /src/lib/ecore_con/dns.c
parent0f46b8d7ec388a17206d6f9434b033603ab04190 (diff)
ecore_con - dns.c - re-fix coverty double-free. coverity was and is right.
fixes CID 1039909 again (it's back after rebase). it is an actual bug.
Diffstat (limited to 'src/lib/ecore_con/dns.c')
-rw-r--r--src/lib/ecore_con/dns.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ecore_con/dns.c b/src/lib/ecore_con/dns.c
index 30f447e..dd50276 100644
--- a/src/lib/ecore_con/dns.c
+++ b/src/lib/ecore_con/dns.c
@@ -5514,8 +5514,8 @@ void dns_so_close(struct dns_socket *so) {
5514 5514
5515 5515
5516void dns_so_reset(struct dns_socket *so) { 5516void dns_so_reset(struct dns_socket *so) {
5517 free(so->answer); 5517 if (so->answer) free(so->answer);
5518 5518 so->answer = NULL;
5519 memset(&so->state, '\0', sizeof *so - offsetof(struct dns_socket, state)); 5519 memset(&so->state, '\0', sizeof *so - offsetof(struct dns_socket, state));
5520} /* dns_so_reset() */ 5520} /* dns_so_reset() */
5521 5521