From 7e215d5394e8cd5b73efcbbac971247d58ecaf48 Mon Sep 17 00:00:00 2001 From: Taeyoung Kim Date: Mon, 9 May 2016 18:38:33 +0900 Subject: [PATCH] tzip: add NULL check routine before releasing fuse_handle - Crash can be occurred if NULL check is skipped. Thus NULL check routine is added. Change-Id: I196f5a63bc3924b8b2c3e838a56f0b105ce867cc Signed-off-by: Taeyoung Kim --- src/tzip/tzip.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tzip/tzip.c b/src/tzip/tzip.c index 2c6f117..50bcafd 100644 --- a/src/tzip/tzip.c +++ b/src/tzip/tzip.c @@ -376,8 +376,10 @@ static void *tzip_thread(void *arg) } tzip_lock(); - fuse_destroy(fuse_handle); - fuse_handle = NULL; + if (fuse_handle) { + fuse_destroy(fuse_handle); + fuse_handle = NULL; + } out_unlock: tzip_unlock(); -- 2.7.4