From d8b6271fdcda0ae0790ccfee09e9c19b72314f65 Mon Sep 17 00:00:00 2001 From: Amitesh Singh Date: Tue, 16 Dec 2014 19:55:12 +0900 Subject: [PATCH] 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 --- src/lib/ecore_con/dns.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/ecore_con/dns.c b/src/lib/ecore_con/dns.c index 8887d6a0c1..cdd93a2036 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) { void dns_so_reset(struct dns_socket *so) { + if (!so) return; if (so->answer) free(so->answer); so->answer = NULL; memset(&so->state, '\0', sizeof *so - offsetof(struct dns_socket, state));