Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/49819/?format=api
http://patchwork.dpdk.org/api/patches/49819/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20190115100137.47470-1-david.hunt@intel.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20190115100137.47470-1-david.hunt@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190115100137.47470-1-david.hunt@intel.com", "date": "2019-01-15T10:01:37", "name": "libs/power: fix the resource leaking issue", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "7162fef91324c14e02f70d20ae5b64c7f0c25b33", "submitter": { "id": 342, "url": "http://patchwork.dpdk.org/api/people/342/?format=api", "name": "Hunt, David", "email": "david.hunt@intel.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20190115100137.47470-1-david.hunt@intel.com/mbox/", "series": [ { "id": 3182, "url": "http://patchwork.dpdk.org/api/series/3182/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=3182", "date": "2019-01-15T10:01:37", "name": "libs/power: fix the resource leaking issue", "version": 1, "mbox": "http://patchwork.dpdk.org/series/3182/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/49819/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/49819/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9B1385F3C;\n\tTue, 15 Jan 2019 11:01:53 +0100 (CET)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby dpdk.org (Postfix) with ESMTP id BD0125F17\n\tfor <dev@dpdk.org>; Tue, 15 Jan 2019 11:01:52 +0100 (CET)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t15 Jan 2019 02:01:51 -0800", "from silpixa00399952.ir.intel.com (HELO\n\tsilpixa00399952.ger.corp.intel.com) ([10.237.223.64])\n\tby orsmga002.jf.intel.com with ESMTP; 15 Jan 2019 02:01:50 -0800" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.56,481,1539673200\"; d=\"scan'208\";a=\"126166668\"", "From": "David Hunt <david.hunt@intel.com>", "To": "dev@dpdk.org", "Cc": "liang.j.ma@intel.com, lei.a.yao@intel.com,\n\tDavid Hunt <david.hunt@intel.com>", "Date": "Tue, 15 Jan 2019 10:01:37 +0000", "Message-Id": "<20190115100137.47470-1-david.hunt@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<1545996779-4098-1-git-send-email-liang.j.ma@intel.com>", "References": "<1545996779-4098-1-git-send-email-liang.j.ma@intel.com>", "Subject": "[dpdk-dev] [PATCH] libs/power: fix the resource leaking issue", "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Liang Ma <liang.j.ma@intel.com>\n\nFixes: e6c6dc0f96c8 (\"power: add p-state driver compatibility\")\nCoverity issue: 328528\n\nv2: focus just on the resource leak. Remove additional code around\n Turbo Boost frequency handling.\n\nSigned-off-by: Liang Ma <liang.j.ma@intel.com>\nReviewed-by: Lei Yao <lei.a.yao@intel.com>\nTested-by: Lei Yao <lei.a.yao@intel.com>\nSigned-off-by: David Hunt <david.hunt@intel.com>\n---\n lib/librte_power/power_pstate_cpufreq.c | 8 ++++++++\n 1 file changed, 8 insertions(+)", "diff": "diff --git a/lib/librte_power/power_pstate_cpufreq.c b/lib/librte_power/power_pstate_cpufreq.c\nindex c4d972fc0..079822bf7 100644\n--- a/lib/librte_power/power_pstate_cpufreq.c\n+++ b/lib/librte_power/power_pstate_cpufreq.c\n@@ -160,6 +160,10 @@ power_init_for_setting_freq(struct pstate_power_info *pi)\n \t\t\tpi->lcore_id);\n \n \tf_max = fopen(fullpath_max, \"rw+\");\n+\n+\tif (f_max == NULL)\n+\t\tfclose(f_min);\n+\n \tFOPEN_OR_ERR_RET(f_max, -1);\n \n \tpi->f_cur_min = f_min;\n@@ -398,6 +402,10 @@ power_get_available_freqs(struct pstate_power_info *pi)\n \tFOPEN_OR_ERR_RET(f_min, ret);\n \n \tf_max = fopen(fullpath_max, \"r\");\n+\n+\tif (f_max == NULL)\n+\t\tfclose(f_min);\n+\n \tFOPEN_OR_ERR_RET(f_max, ret);\n \n \ts_min = fgets(buf_min, sizeof(buf_min), f_min);\n", "prefixes": [] }{ "id": 49819, "url": "