Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/79835/?format=api
https://patches.dpdk.org/api/patches/79835/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201006203755.90779-7-cristian.dumitrescu@intel.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20201006203755.90779-7-cristian.dumitrescu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20201006203755.90779-7-cristian.dumitrescu@intel.com", "date": "2020-10-06T20:37:55", "name": "[7/7] pipeline: fix instruction config free", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "e4c88704e8cd271e113be433663327562da1472c", "submitter": { "id": 19, "url": "https://patches.dpdk.org/api/people/19/?format=api", "name": "Cristian Dumitrescu", "email": "cristian.dumitrescu@intel.com" }, "delegate": { "id": 24651, "url": "https://patches.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20201006203755.90779-7-cristian.dumitrescu@intel.com/mbox/", "series": [ { "id": 12731, "url": "https://patches.dpdk.org/api/series/12731/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=12731", "date": "2020-10-06T20:37:49", "name": "[1/7] pipeline: fix memory leak issue", "version": 1, "mbox": "https://patches.dpdk.org/series/12731/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/79835/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/79835/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id D7CB6A04C0;\n\tTue, 6 Oct 2020 22:39:27 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 421C31B5E1;\n\tTue, 6 Oct 2020 22:38:09 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by dpdk.org (Postfix) with ESMTP id E5AF12C28\n for <dev@dpdk.org>; Tue, 6 Oct 2020 22:38:02 +0200 (CEST)", "from orsmga004.jf.intel.com ([10.7.209.38])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Oct 2020 13:38:02 -0700", "from silpixa00400573.ir.intel.com (HELO\n silpixa00400573.ger.corp.intel.com) ([10.237.223.107])\n by orsmga004.jf.intel.com with ESMTP; 06 Oct 2020 13:38:02 -0700" ], "IronPort-SDR": [ "\n 3X2iW1MQ6GY0ePWWpdaQBVEJx+w1nA5mvZ05ale0V0+X8n5gmtfY7+z61PuVUni5K9xqATbbfE\n qeAdpfyO/73A==", "\n /D3cNOiDd2WysEA8ZoKSt1kp3eE9GIwJcdWms8jy3a62eH4CoE5imIfgPMhuUseyp3Mfyznz4G\n CE6iD5qzFi0A==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9766\"; a=\"151607415\"", "E=Sophos;i=\"5.77,343,1596524400\"; d=\"scan'208\";a=\"151607415\"", "E=Sophos;i=\"5.77,343,1596524400\"; d=\"scan'208\";a=\"460985815\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>", "To": "dev@dpdk.org", "Date": "Tue, 6 Oct 2020 21:37:55 +0100", "Message-Id": "<20201006203755.90779-7-cristian.dumitrescu@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20201006203755.90779-1-cristian.dumitrescu@intel.com>", "References": "<20201006203755.90779-1-cristian.dumitrescu@intel.com>", "Subject": "[dpdk-dev] [PATCH 7/7] pipeline: fix instruction config free", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Fixes: a1711f948d (\"pipeline: add SWX Rx and extract instructions\")\nCoverity issue: 362901\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\n---\n lib/librte_pipeline/rte_swx_pipeline.c | 11 +++++------\n 1 file changed, 5 insertions(+), 6 deletions(-)", "diff": "diff --git a/lib/librte_pipeline/rte_swx_pipeline.c b/lib/librte_pipeline/rte_swx_pipeline.c\nindex a4d072d6d..d5b4a1cc6 100644\n--- a/lib/librte_pipeline/rte_swx_pipeline.c\n+++ b/lib/librte_pipeline/rte_swx_pipeline.c\n@@ -5932,7 +5932,6 @@ instruction_config(struct rte_swx_pipeline *p,\n {\n \tstruct instruction *instr = NULL;\n \tstruct instruction_data *data = NULL;\n-\tchar *string = NULL;\n \tint err = 0;\n \tuint32_t i;\n \n@@ -5955,15 +5954,17 @@ instruction_config(struct rte_swx_pipeline *p,\n \t}\n \n \tfor (i = 0; i < n_instructions; i++) {\n-\t\tstring = strdup(instructions[i]);\n+\t\tchar *string = strdup(instructions[i]);\n \t\tif (!string) {\n \t\t\terr = ENOMEM;\n \t\t\tgoto error;\n \t\t}\n \n \t\terr = instr_translate(p, a, string, &instr[i], &data[i]);\n-\t\tif (err)\n+\t\tif (err) {\n+\t\t\tfree(string);\n \t\t\tgoto error;\n+\t\t}\n \n \t\tfree(string);\n \t}\n@@ -5982,8 +5983,6 @@ instruction_config(struct rte_swx_pipeline *p,\n \tif (err)\n \t\tgoto error;\n \n-\tfree(data);\n-\n \tif (a) {\n \t\ta->instructions = instr;\n \t\ta->n_instructions = n_instructions;\n@@ -5992,10 +5991,10 @@ instruction_config(struct rte_swx_pipeline *p,\n \t\tp->n_instructions = n_instructions;\n \t}\n \n+\tfree(data);\n \treturn 0;\n \n error:\n-\tfree(string);\n \tfree(data);\n \tfree(instr);\n \treturn err;\n", "prefixes": [ "7/7" ] }{ "id": 79835, "url": "