From patchwork Tue Sep 27 04:37:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Suresh Narayane, Harshad" X-Patchwork-Id: 116961 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1F053A00C2; Tue, 27 Sep 2022 10:29:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0169E41133; Tue, 27 Sep 2022 10:29:24 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 93DEA410D0 for ; Tue, 27 Sep 2022 10:29:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664267360; x=1695803360; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Eg1l6tTk+AEcAZMKojSO6Z8/+PWfI1wjcYOCS435nKE=; b=fvJNuopldqoI4fbmz0B00vdQqoj1vQlOPNHOmcBR+ydR1Ai5hdcGfgpo K8/BmM7TsOAK2eUE4rk0GFFw94XDCgNc2ClfcDBs/v6IUbkX3eMFAQmpv 9MXpsXGl3BM+Md9UKiR2mifmGzEZvoPb8f0gqpC5/ESTbefEWm5ikbBjc 8FKtjKJy7GcMW/EP1VSBFjY8UQLu/uoDKQUWN2/CDELucwQar0W3HYbvw QuYvKksSSrSTS8nId9vKrrqWPgiBlqchTUJUlYGQWG7/1PMIOs5GpczlA hInLT95gepKdMxjadMsvJqzFQvs8PBMVUJPZBrXzziOCOrXYleHu5nwIA w==; X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="365299772" X-IronPort-AV: E=Sophos;i="5.93,348,1654585200"; d="scan'208";a="365299772" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2022 01:29:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="572572407" X-IronPort-AV: E=Sophos;i="5.93,348,1654585200"; d="scan'208";a="572572407" Received: from ena-1.iind.intel.com (HELO localhost.localdomain) ([10.190.200.207]) by orsmga003.jf.intel.com with ESMTP; 27 Sep 2022 01:29:19 -0700 From: Harshad Narayane To: dev@dpdk.org Cc: Kamalakannan R , Cristian Dumitrescu Subject: [PATCH] examples/pipeline: fix memory free Date: Tue, 27 Sep 2022 00:37:32 -0400 Message-Id: <20220927043732.366980-1-harshad.suresh.narayane@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Coverity issue: 380863 Coverity issue: 380866 Fixes: 6bc14d9f ("examples/pipeline: add command for shared library build") Fix memory resource free for buffer allocation failure at pipeline library build. Signed-off-by: Harshad Narayane Signed-off-by: Kamalakannan R Acked-by: Cristian Dumitrescu --- examples/pipeline/cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/pipeline/cli.c b/examples/pipeline/cli.c index 1158e51e89..e1e7aaddc1 100644 --- a/examples/pipeline/cli.c +++ b/examples/pipeline/cli.c @@ -642,7 +642,7 @@ cmd_pipeline_libbuild(char **tokens, buffer = malloc(MAX_LINE_SIZE); if (!buffer) { snprintf(out, out_size, MSG_OUT_OF_MEMORY); - return; + goto free; } snprintf(buffer,