EINA_SAFE_FREE is needed here!

I will add it today :)
Thanks.

Daniel Juyung Seo (SeoZ)



On Fri, Dec 13, 2013 at 9:43 AM, Carsten Haitzler <ras...@rasterman.com>wrote:

> raster pushed a commit to branch master.
>
>
> http://git.enlightenment.org/core/efl.git/commit/?id=675309d9d91fd8a21588e67944e2a3c702bf0983
>
> commit 675309d9d91fd8a21588e67944e2a3c702bf0983
> Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
> Date:   Fri Dec 13 09:41:23 2013 +0900
>
>     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.
> ---
>  src/lib/ecore_con/dns.c | 4 ++--
>  1 file 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) {
>
>
>  void dns_so_reset(struct dns_socket *so) {
> -       free(so->answer);
> -
> +       if (so->answer) free(so->answer);
> +       so->answer = NULL;
>         memset(&so->state, '\0', sizeof *so - offsetof(struct dns_socket,
> state));
>  } /* dns_so_reset() */
>
>
> --
>
>
>
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to