From d016f08e18a40b9fb7a01b3129e3678cd3f479d0 Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Mon, 16 Sep 2019 14:06:06 +0900 Subject: [PATCH] tbm_surface_internal: fix null pointer dereference Change-Id: Ibfa51ce01a8168b194752eb10c1d319e4f1fea79 --- src/tbm_surface_internal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tbm_surface_internal.c b/src/tbm_surface_internal.c index 532d51f..2da84bd 100644 --- a/src/tbm_surface_internal.c +++ b/src/tbm_surface_internal.c @@ -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)) { -- 2.7.4