edje - delete obj - null out freed items in structs/data 68/103468/1
authorPrateek Thakur <prateek.th@samsung.com>
Thu, 8 Dec 2016 11:05:49 +0000 (16:35 +0530)
committerPrateek Thakur <prateek.th@samsung.com>
Thu, 8 Dec 2016 11:05:49 +0000 (16:35 +0530)
Summary: This patch is from upstream.

commit c2e26a51215d379a6926b0ca44f3d4d664d84bb4
Author: Carsten Haitzler (Rasterman) <raster@rasterman.com>
Date:   Wed Apr 13 19:59:00 2016 +0900

    edje - delete obj - null out freed items in structs/data

    i just got a segv freeing ian invalid ptr... it SEEMS as if something
    has tried to free and edje object twice... but i can't be sure as
    valgrind can't catch this. it's a one-off, so ensure after free, we
    NULL out things we freed to avoid this.

    @fix

Change-Id: I201d34850e3cf5f3981236065f04abb197aebbaa
Signed-off-by: Prateek Thakur <prateek.th@samsung.com>
src/lib/edje/edje_signal.c

index 751ef45..f8988af 100644 (file)
@@ -292,7 +292,9 @@ _edje_signal_callback_free(const Edje_Signal_Callback_Group *cgp)
    _edje_signal_callback_matches_unref((Edje_Signal_Callback_Matches *)gp->matches);
    gp->matches = NULL;
    free(gp->flags);
+   gp->flags = NULL;
    free(gp->custom_data);
+   gp->custom_data = NULL;
    free(gp);
 }