tbm_surface_internal: fix null pointer dereference 65/213865/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Mon, 16 Sep 2019 05:06:06 +0000 (14:06 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Mon, 16 Sep 2019 05:10:49 +0000 (14:10 +0900)
Change-Id: Ibfa51ce01a8168b194752eb10c1d319e4f1fea79

src/tbm_surface_internal.c

index 532d51f..2da84bd 100644 (file)
@@ -357,7 +357,7 @@ _tbm_surface_internal_destroy(tbm_surface_h surface)
        free(surface);
        surface = NULL;
 
-       if (LIST_IS_EMPTY(&bufmgr->surf_list)) {
+       if (bufmgr && LIST_IS_EMPTY(&bufmgr->surf_list)) {
                LIST_DELINIT(&bufmgr->surf_list);
 
                if (!LIST_IS_EMPTY(&bufmgr->debug_key_list)) {