From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] vhost: fix coverity defect Date: Wed, 06 Apr 2016 12:18:04 +0200 Message-ID: <1648720.2F4xWX4cp3@xps13> References: <1459836043-18863-1-git-send-email-yuanhan.liu@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, huawei.xie@intel.com To: Yuanhan Liu Return-path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 5503411C5 for ; Wed, 6 Apr 2016 12:19:43 +0200 (CEST) Received: by mail-wm0-f43.google.com with SMTP id v188so17487822wme.1 for ; Wed, 06 Apr 2016 03:19:43 -0700 (PDT) In-Reply-To: <1459836043-18863-1-git-send-email-yuanhan.liu@linux.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > Fix following coverity defect: > > 291 void > 292 vhost_destroy_device(struct vhost_device_ctx ctx) > 293 { > 294 struct virtio_net *dev = get_device(ctx); > 295 > >>> CID 124565: Null pointer dereferences (NULL_RETURNS) > >>> Dereferencing a null pointer "dev". > > Fixes: 45ca9c6f7bc6 ("vhost: get rid of linked list for devices") > > Reported-by: John McNamara > Signed-off-by: Yuanhan Liu Applied, thanks