From: Kunhoon Baik Date: Wed, 23 Nov 2016 08:42:32 +0000 (+0900) Subject: Potential Bug Fix : Checking NULL X-Git-Tag: accepted/tizen/3.0/common/20161129.103342~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a85c924f1bc605864ee67af2d21f7b3c7bf1b786;p=platform%2Fcore%2Fsystem%2Fdeviced.git Potential Bug Fix : Checking NULL Change-Id: Id9c6bbdfe2d64933495a6d8a91080270543a916c --- diff --git a/src/block/block.c b/src/block/block.c index d88bad3..fd399aa 100644 --- a/src/block/block.c +++ b/src/block/block.c @@ -1664,8 +1664,15 @@ static void trigger_operation(struct block_device *bdev, dd_list *queue, struct block_send_dbus_reply(op->msg, ret); queue = bdev->op_queue; - queue = DD_LIST_NEXT(queue); - op = DD_LIST_NTH(queue, 0); + if(queue != NULL) { + queue = DD_LIST_NEXT(queue); + if(queue != NULL) + op = DD_LIST_NTH(queue, 0); + else + op = NULL; + }else + op = NULL; + remove_operation(bdev); pthread_mutex_unlock(&(th_manager[thread_id].mutex));