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
This commit is contained in:
Amitesh Singh 2014-12-16 19:55:12 +09:00 committed by Carsten Haitzler (Rasterman)
parent 5c96fd457e
commit d8b6271fdc
1 changed files with 1 additions and 0 deletions

View File

@ -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));