Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/82237/?format=api
http://patches.dpdk.org/api/patches/82237/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201026212355.8769-1-cristian.dumitrescu@intel.com/", "project": { "id": 1, "url": "http://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": "<20201026212355.8769-1-cristian.dumitrescu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20201026212355.8769-1-cristian.dumitrescu@intel.com", "date": "2020-10-26T21:23:55", "name": "examples/pipeline: fix resource leak", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "4ffe85c2e474aa4063a5d1ef787c7a0c046f6e04", "submitter": { "id": 19, "url": "http://patches.dpdk.org/api/people/19/?format=api", "name": "Cristian Dumitrescu", "email": "cristian.dumitrescu@intel.com" }, "delegate": { "id": 24651, "url": "http://patches.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20201026212355.8769-1-cristian.dumitrescu@intel.com/mbox/", "series": [ { "id": 13345, "url": "http://patches.dpdk.org/api/series/13345/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13345", "date": "2020-10-26T21:23:55", "name": "examples/pipeline: fix resource leak", "version": 1, "mbox": "http://patches.dpdk.org/series/13345/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/82237/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/82237/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 5E2F6A04DD;\n\tMon, 26 Oct 2020 22:24:05 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id ADB471E2B;\n\tMon, 26 Oct 2020 22:24:01 +0100 (CET)", "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by dpdk.org (Postfix) with ESMTP id 622051D9E\n for <dev@dpdk.org>; Mon, 26 Oct 2020 22:23:59 +0100 (CET)", "from fmsmga004.fm.intel.com ([10.253.24.48])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 26 Oct 2020 14:23:57 -0700", "from silpixa00400573.ir.intel.com (HELO\n silpixa00400573.ger.corp.intel.com) ([10.237.223.107])\n by fmsmga004.fm.intel.com with ESMTP; 26 Oct 2020 14:23:56 -0700" ], "IronPort-SDR": [ "\n rCHHvopHb2tWGFwR1gE7Kri1+eCE4WWLfr+wr3glVy71YS0Os1oyQUBk0+xohDpMn0fMKfEsug\n oyaHiW4thavw==", "\n HQi5P/GtsdwpCUS2DvRerWWlnpDbHvE/JeoVxfjpaSXNNXowSQsVJulHyVFp1UmORzQr9ZrGiz\n XUH611pPv65A==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9786\"; a=\"155769346\"", "E=Sophos;i=\"5.77,421,1596524400\"; d=\"scan'208\";a=\"155769346\"", "E=Sophos;i=\"5.77,421,1596524400\"; d=\"scan'208\";a=\"350268707\"" ], "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": "Mon, 26 Oct 2020 21:23:55 +0000", "Message-Id": "<20201026212355.8769-1-cristian.dumitrescu@intel.com>", "X-Mailer": "git-send-email 2.17.1", "Subject": "[dpdk-dev] [PATCH] examples/pipeline: fix resource leak", "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": "Coverity issue: 363041\nFixes: 5074e1d551 (\"examples/pipeline: add configuration commands\")\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\n---\n examples/pipeline/cli.c | 15 +++++++++++++++\n 1 file changed, 15 insertions(+)", "diff": "diff --git a/examples/pipeline/cli.c b/examples/pipeline/cli.c\nindex 8ac6b3f5f..d0150cfcf 100644\n--- a/examples/pipeline/cli.c\n+++ b/examples/pipeline/cli.c\n@@ -779,6 +779,18 @@ cmd_pipeline_build(char **tokens,\n \t}\n }\n \n+static void\n+table_entry_free(struct rte_swx_table_entry *entry)\n+{\n+\tif (!entry)\n+\t\treturn;\n+\n+\tfree(entry->key);\n+\tfree(entry->key_mask);\n+\tfree(entry->action_data);\n+\tfree(entry);\n+}\n+\n static const char cmd_pipeline_table_update_help[] =\n \"pipeline <pipeline_name> table <table_name> update <file_name_add> \"\n \"<file_name_delete> <file_name_default>\";\n@@ -885,6 +897,7 @@ cmd_pipeline_table_update(char **tokens,\n \t\t\tstatus = rte_swx_ctl_pipeline_table_entry_add(p->ctl,\n \t\t\t\ttable_name,\n \t\t\t\tentry);\n+\t\t\ttable_entry_free(entry);\n \t\t\tif (status) {\n \t\t\t\tsnprintf(out, out_size,\n \t\t\t\t\t\"Invalid entry in file %s at line %u\",\n@@ -914,6 +927,7 @@ cmd_pipeline_table_update(char **tokens,\n \t\t\tstatus = rte_swx_ctl_pipeline_table_entry_delete(p->ctl,\n \t\t\t\ttable_name,\n \t\t\t\tentry);\n+\t\t\ttable_entry_free(entry);\n \t\t\tif (status) {\n \t\t\t\tsnprintf(out, out_size,\n \t\t\t\t\t\"Invalid entry in file %s at line %u\",\n@@ -942,6 +956,7 @@ cmd_pipeline_table_update(char **tokens,\n \t\t\tstatus = rte_swx_ctl_pipeline_table_default_entry_add(p->ctl,\n \t\t\t\ttable_name,\n \t\t\t\tentry);\n+\t\t\ttable_entry_free(entry);\n \t\t\tif (status) {\n \t\t\t\tsnprintf(out, out_size,\n \t\t\t\t\t\"Invalid entry in file %s at line %u\",\n", "prefixes": [] }{ "id": 82237, "url": "