summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con/dns.c
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2014-12-16 19:55:12 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-12-16 19:56:33 +0900
commitd8b6271fdcda0ae0790ccfee09e9c19b72314f65 (patch)
tree66554528f3f69dea1225b9d2ae2fd6711f711b65 /src/lib/ecore_con/dns.c
parent5c96fd457e00202b7bb32c406940e9ad91328b4f (diff)
ecore_con: Added NULL check in dns_so_reset() for dns_socket object.
Summary: @fix Reviewers: zmike, tasn, seoz, raster Subscribers: cedric, seoz Differential Revision: https://phab.enlightenment.org/D1411
Diffstat (limited to 'src/lib/ecore_con/dns.c')
-rw-r--r--src/lib/ecore_con/dns.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/ecore_con/dns.c b/src/lib/ecore_con/dns.c
index 8887d6a..cdd93a2 100644
--- a/src/lib/ecore_con/dns.c
+++ b/src/lib/ecore_con/dns.c
@@ -5517,6 +5517,7 @@ void dns_so_close(struct dns_socket *so) {
5517 5517
5518 5518
5519void dns_so_reset(struct dns_socket *so) { 5519void dns_so_reset(struct dns_socket *so) {
5520 if (!so) return;
5520 if (so->answer) free(so->answer); 5521 if (so->answer) free(so->answer);
5521 so->answer = NULL; 5522 so->answer = NULL;
5522 memset(&so->state, '\0', sizeof *so - offsetof(struct dns_socket, state)); 5523 memset(&so->state, '\0', sizeof *so - offsetof(struct dns_socket, state));