get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/91440/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 91440,
    "url": "http://patchwork.dpdk.org/api/patches/91440/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210414100700.127129-1-anatoly.burakov@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": "<20210414100700.127129-1-anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210414100700.127129-1-anatoly.burakov@intel.com",
    "date": "2021-04-14T10:07:00",
    "name": "[v2] power: fix resource leak",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "02f736a9405e98af7401facc8353f3a1697134c5",
    "submitter": {
        "id": 4,
        "url": "http://patchwork.dpdk.org/api/people/4/?format=api",
        "name": "Burakov, Anatoly",
        "email": "anatoly.burakov@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/20210414100700.127129-1-anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 16366,
            "url": "http://patchwork.dpdk.org/api/series/16366/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=16366",
            "date": "2021-04-14T10:07:00",
            "name": "[v2] power: fix resource leak",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/16366/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/91440/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/91440/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 6B331A0562;\n\tWed, 14 Apr 2021 12:07:05 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id ED08F161923;\n\tWed, 14 Apr 2021 12:07:04 +0200 (CEST)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n by mails.dpdk.org (Postfix) with ESMTP id B0EFF16188A\n for <dev@dpdk.org>; Wed, 14 Apr 2021 12:07:03 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 14 Apr 2021 03:07:02 -0700",
            "from silpixa00399498.ir.intel.com (HELO\n silpixa00399498.ger.corp.intel.com) ([10.237.223.188])\n by orsmga002.jf.intel.com with ESMTP; 14 Apr 2021 03:07:01 -0700"
        ],
        "IronPort-SDR": [
            "\n 9BSw4ZKskTuk/MQfuLe02gIcktqbXmQOK2JZHaG3UezGZs1AjKPbfgUfwmcoIRlNqlMZgjdiOD\n Kot3CYKIDcGg==",
            "\n zU2TgasIVuKSEYJPhvntUXeqWob44Db0ToGdbVWsZudhgqvMwM4IJXoZ74YHJIWFttMJtwosCY\n 83GEsx7BWeug=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,9953\"; a=\"279920086\"",
            "E=Sophos;i=\"5.82,221,1613462400\"; d=\"scan'208\";a=\"279920086\"",
            "E=Sophos;i=\"5.82,221,1613462400\"; d=\"scan'208\";a=\"399131229\""
        ],
        "X-ExtLoop1": "1",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "david.hunt@intel.com,\n\treshma.pattan@intel.com",
        "Date": "Wed, 14 Apr 2021 10:07:00 +0000",
        "Message-Id": "<20210414100700.127129-1-anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210413122208.101057-1-anatoly.burakov@intel.com>",
        "References": "<20210413122208.101057-1-anatoly.burakov@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2] power: fix resource leak",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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": "Currently, we open the system base frequency file, but never close it,\nwhich results in a memory leak.\n\nCoverity issue: 369693\n\nFixes: 8a5febaac4f7 (\"power: fix P-state base frequency handling\")\nCc: david.hunt@intel.com\nCc: reshma.pattan@intel.com\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n\nNotes:\n    Ideally, the close should be added at the end, but there's a bunch of ERR_RET\n    macros before that, so addressing that would put us dangerously close to\n    refactoring, which is not what we want to do so close to the release.\n    \n    This issue was already \"fixed\", but because the variable naming and the flow of\n    code is confusing, the fix was addressing a different variable. There is a\n    patch for 21.08 that will address the code flow and make it less confusing.\n    \n    v2:\n    - Move the fd close to before we check read data\n\n lib/librte_power/power_pstate_cpufreq.c | 5 +++++\n 1 file changed, 5 insertions(+)",
    "diff": "diff --git a/lib/librte_power/power_pstate_cpufreq.c b/lib/librte_power/power_pstate_cpufreq.c\nindex ec745153d3..2cfc54acf3 100644\n--- a/lib/librte_power/power_pstate_cpufreq.c\n+++ b/lib/librte_power/power_pstate_cpufreq.c\n@@ -175,6 +175,11 @@ power_init_for_setting_freq(struct pstate_power_info *pi)\n \tFOPEN_OR_ERR_RET(f_base_max, -1);\n \tif (f_base_max != NULL) {\n \t\ts_base_max = fgets(buf_base, sizeof(buf_base), f_base_max);\n+\n+\t\t/* close the file unconditionally */\n+\t\tfclose(f_base_max);\n+\t\tf_base_max = NULL;\n+\n \t\tFOPS_OR_NULL_GOTO(s_base_max, out);\n \n \t\tbuf_base[BUFSIZ-1] = '\\0';\n",
    "prefixes": [
        "v2"
    ]
}