From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2AACFA00BE; Mon, 27 Apr 2020 18:56:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0574F1D528; Mon, 27 Apr 2020 18:56:54 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 310861D519 for ; Mon, 27 Apr 2020 18:56:52 +0200 (CEST) IronPort-SDR: LXkHWOHl/61/yHTLPKzdtBOVDHhZ/rTJ0Jl4G9TBRB2kqfZrRewxdDscz0qXGq7V1tuhYMyaq6 /at1n0KC+DYQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2020 09:56:51 -0700 IronPort-SDR: JVTPLGaTZcj/DcpwHyGj0zf5AukrrM6x2v5eUDL9h04OlkNSlbrZAYpm1dFwJxHpPcdwLFJgCg eeV92JtvPE4A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,324,1583222400"; d="scan'208";a="336348882" Received: from silpixa00400517.ir.intel.com ([10.237.214.174]) by orsmga001.jf.intel.com with ESMTP; 27 Apr 2020 09:56:50 -0700 From: Jasvinder Singh To: dev@dpdk.org Cc: cristian.dumitrescu@intel.com Date: Mon, 27 Apr 2020 17:56:49 +0100 Message-Id: <20200427165649.50591-1-jasvinder.singh@intel.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] examples/ip_pipeline: fix resource leak for thread X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" For sending request messages to data plane threads, the caller invokes thread_msg_send_recv() function which never returns null response. Thus, removed redundant check on the returned response. Coverity Issues: 357773, 357723 Fixes: 32e5d9b154cb ("examples/ip_pipeline: add enable and disable commands") Signed-off-by: Jasvinder Singh Acked-by: Cristian Dumitrescu --- examples/ip_pipeline/thread.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/examples/ip_pipeline/thread.c b/examples/ip_pipeline/thread.c index 272fbbeed..fda4d3c2a 100644 --- a/examples/ip_pipeline/thread.c +++ b/examples/ip_pipeline/thread.c @@ -325,8 +325,6 @@ thread_pipeline_enable(uint32_t thread_id, /* Send request and wait for response */ rsp = thread_msg_send_recv(thread_id, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -412,8 +410,6 @@ thread_pipeline_disable(uint32_t thread_id, /* Send request and wait for response */ rsp = thread_msg_send_recv(thread_id, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; -- 2.21.1