From: Paulo Pizarro Date: Mon, 18 Jun 2012 02:22:39 +0000 (-0300) Subject: dnsproxy: Release all the fields of the request after forward dns reply X-Git-Tag: 2.0_alpha~58 X-Git-Url: http://review.tizen.org/git/?p=framework%2Fconnectivity%2Fconnman.git;a=commitdiff_plain;h=56f0234b1d6c0c0694a523697a9c17dc6b92cbae dnsproxy: Release all the fields of the request after forward dns reply --- diff --git a/src/dnsproxy.c b/src/dnsproxy.c index 5adede5..9a4fa47 100644 --- a/src/dnsproxy.c +++ b/src/dnsproxy.c @@ -1609,9 +1609,6 @@ static int forward_dns_reply(unsigned char *reply, int reply_len, int protocol, if (hdr->rcode > 0 && req->numresp < req->numserv) return -EINVAL; - if (req->timeout > 0) - g_source_remove(req->timeout); - request_list = g_slist_remove(request_list, req); if (protocol == IPPROTO_UDP) { @@ -1624,8 +1621,7 @@ static int forward_dns_reply(unsigned char *reply, int reply_len, int protocol, close(sk); } - g_free(req->resp); - g_free(req); + destroy_request_data(req); return err; }