From patchwork Thu Aug 3 19:00:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 109359 Delivered-To: patch@linaro.org Received: by 10.140.101.6 with SMTP id t6csp1161843qge; Thu, 3 Aug 2017 12:02:04 -0700 (PDT) X-Received: by 10.55.140.134 with SMTP id o128mr3969484qkd.250.1501786924758; Thu, 03 Aug 2017 12:02:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501786924; cv=none; d=google.com; s=arc-20160816; b=0tl9GJCkLeIa7d22q06gLbR8OW6DrBFCTdjSqzJBbHWm9ySTqsWUxurKDv/As7WYle lf1fa15cj8NPMC0txx8qC1cmdO+WM5OE873akZEgnzlefuwHbTJmMDhol84JI8yJ4Pa6 NHVjo5LVhWaU2q/hSxj8vroTwK0yuG+LLUDlDEuN7t3cfGWW49DpAzf4wVGRMdwYeFLb XYr70sTTYSzALyGR+94KdRN4mic5Y0MJTRTt7OCWCSfYxaKU+Qb/pbiIQ78UDIQyIWVD b/UHuO+zQzUs+yIJZuastR3V8db85t5DmU8H7VkdedMF0yPoDgsBIOHNPfiBSynJN/4t OIPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=gw9ZT1axOgRhMzcYVOxIPsJcY4ABD7Z8BkF7AqpqnXk=; b=irWJFt8kcdHotwFL/MJ1KpE4Ze9TU0C/sXtdxnuMRSZP6jRlsvmmW9M+4xLUk58Srz GBIIHWp74Ar8lZk0gW2QH9QsWUNtarNgsEF/Mfrr2zNM6Tfd/yfnrVDDBnpaxPaPKutA 8HQAcRmQYn1xqZnZtBbBb7PSi7JTVeTNUhPm159xfK/LpcHmE+rBWoX4n9pq1/dx5G+B oop/TUzGjsYOw/ZIfFRtRFuwVx/ncWILcTvav15H5rr+ewrPDxKbgLmbHTMI2xDxm0oF f6Szn6QTasHZi99nV/AZmHnopEPJEoLnnnavuEFsVbGde+LKxMKrbkbnQGAuCXLcRwr1 WONQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id d202si32028406qkg.309.2017.08.03.12.02.04; Thu, 03 Aug 2017 12:02:04 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 6CFB36358D; Thu, 3 Aug 2017 19:02:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id B4CB760D68; Thu, 3 Aug 2017 19:01:07 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id AAF3C6084A; Thu, 3 Aug 2017 19:01:03 +0000 (UTC) Received: from forward2h.cmail.yandex.net (forward2h.cmail.yandex.net [87.250.230.17]) by lists.linaro.org (Postfix) with ESMTPS id 5E8AC60718 for ; Thu, 3 Aug 2017 19:00:56 +0000 (UTC) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [77.88.29.86]) by forward2h.cmail.yandex.net (Yandex) with ESMTP id E55A920749 for ; Thu, 3 Aug 2017 22:00:54 +0300 (MSK) Received: from smtp3p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3p.mail.yandex.net (Yandex) with ESMTP id C459E132004C for ; Thu, 3 Aug 2017 22:00:54 +0300 (MSK) Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id cjZ69wYnpA-0rim2JXr; Thu, 03 Aug 2017 22:00:53 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Thu, 3 Aug 2017 22:00:30 +0300 Message-Id: <1501786830-1874-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1501786830-1874-1-git-send-email-odpbot@yandex.ru> References: <1501786830-1874-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 101 Subject: [lng-odp] [PATCH v3 2/2] linux-gen: Added additional missing free X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Ilias Apalodimas Added 2 additional missing frees in _odp_queue_pool_create() as requested on review. Signed-off-by: Ilias Apalodimas --- /** Email created from pull request 101 (apalos:bug_3182) ** https://github.com/Linaro/odp/pull/101 ** Patch: https://github.com/Linaro/odp/pull/101.patch ** Base sha: 4537d096721a753086592ed5a989beab5647bcfa ** Merge commit sha: 7bee8312cef61d52ce1c788583f3831f05afcfeb **/ platform/linux-generic/odp_pkt_queue.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_pkt_queue.c b/platform/linux-generic/odp_pkt_queue.c index 06420a96..f1086096 100644 --- a/platform/linux-generic/odp_pkt_queue.c +++ b/platform/linux-generic/odp_pkt_queue.c @@ -241,8 +241,11 @@ _odp_int_queue_pool_t _odp_queue_pool_create(uint32_t max_num_queues, */ initial_free_list_size = MIN(64 * 1024, max_queued_pkts / 4); rc = pkt_queue_free_list_add(pool, initial_free_list_size); - if (rc < 0) + if (rc < 0) { + free(pool->queue_num_tbl); + free(pool); return _ODP_INT_QUEUE_POOL_INVALID; + } /* Discard the first queue blk with idx 0 */ queue_blk_alloc(pool, &first_queue_blk_idx);