Fix the destroy bug.
authorSung-jae Park <nicesj.park@samsung.com>
Tue, 19 Aug 2014 13:50:38 +0000 (22:50 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Tue, 19 Aug 2014 13:50:38 +0000 (22:50 +0900)
Change-Id: I8a3858323fe8eac1b4ce073fcc7410a63906f523

src/lb.c

index 5564165..61b180b 100644 (file)
--- a/src/lb.c
+++ b/src/lb.c
@@ -1649,8 +1649,8 @@ HAPI int lb_destroy(const char *pkgname, const char *id, int type)
                item->deleteme = 1;
        } else {
                update_monitor_del(id, item);
-               free(item);
                (void)so_destroy(inst, item->unload_so);
+               free(item);
        }
 
        return LB_STATUS_SUCCESS;