get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 47135,
    "url": "http://patchwork.dpdk.org/api/patches/47135/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/9183826f1b6f3bb3d80cdde12fbd59f07f4df348.1540212745.git.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": "<9183826f1b6f3bb3d80cdde12fbd59f07f4df348.1540212745.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/9183826f1b6f3bb3d80cdde12fbd59f07f4df348.1540212745.git.anatoly.burakov@intel.com",
    "date": "2018-10-22T12:57:03",
    "name": "mem: fix resource leak",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "7760f20d46c575918bb64146ad5f48b84d428396",
    "submitter": {
        "id": 4,
        "url": "http://patchwork.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "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/9183826f1b6f3bb3d80cdde12fbd59f07f4df348.1540212745.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 2009,
            "url": "http://patchwork.dpdk.org/api/series/2009/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=2009",
            "date": "2018-10-22T12:57:03",
            "name": "mem: fix resource leak",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/2009/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/47135/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/47135/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 9EC5F4CA5;\n\tMon, 22 Oct 2018 14:57:07 +0200 (CEST)",
            "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n\tby dpdk.org (Postfix) with ESMTP id D8F804C9F;\n\tMon, 22 Oct 2018 14:57:05 +0200 (CEST)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t22 Oct 2018 05:57:04 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby fmsmga006.fm.intel.com with ESMTP; 22 Oct 2018 05:57:04 -0700",
            "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tw9MCv39p004480; Mon, 22 Oct 2018 13:57:03 +0100",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id w9MCv3mn027516;\n\tMon, 22 Oct 2018 13:57:03 +0100",
            "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id w9MCv3LX027512;\n\tMon, 22 Oct 2018 13:57:03 +0100"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.54,412,1534834800\"; d=\"scan'208\";a=\"274530995\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "stable@dpdk.org",
        "Date": "Mon, 22 Oct 2018 13:57:03 +0100",
        "Message-Id": "<9183826f1b6f3bb3d80cdde12fbd59f07f4df348.1540212745.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "Subject": "[dpdk-dev] [PATCH] mem: 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\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": "Segment preallocation code allocates an array of structures on the\nheap but does not free the memory afterwards. Fix it by freeing it\nat the end of the function, and changing control flow to always go\nthrough that code path.\n\nFixes: 1dd342d0fdc4 (\"mem: improve segment list preallocation\")\n\nCoverity ID: 323524\n\nCc: stable@dpdk.org\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n\nNotes:\n    Not sure if stable release script picks up fixes for commits intended\n    for stable releases?\n\n lib/librte_eal/linuxapp/eal/eal_memory.c | 16 ++++++++++------\n 1 file changed, 10 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c\nindex 19e686eb6..fce86fda6 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_memory.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c\n@@ -2135,7 +2135,7 @@ memseg_primary_init(void)\n \t\tuint64_t page_sz;\n \t\tint socket_id;\n \t} *memtypes = NULL;\n-\tint i, hpi_idx, msl_idx;\n+\tint i, hpi_idx, msl_idx, ret = -1; /* fail unless told to succeed */\n \tstruct rte_memseg_list *msl;\n \tuint64_t max_mem, max_mem_per_type;\n \tunsigned int max_seglists_per_type;\n@@ -2227,7 +2227,7 @@ memseg_primary_init(void)\n \tif (max_seglists_per_type == 0) {\n \t\tRTE_LOG(ERR, EAL, \"Cannot accommodate all memory types, please increase %s\\n\",\n \t\t\tRTE_STR(CONFIG_RTE_MAX_MEMSEG_LISTS));\n-\t\treturn -1;\n+\t\tgoto out;\n \t}\n \n \t/* go through all mem types and create segment lists */\n@@ -2287,21 +2287,25 @@ memseg_primary_init(void)\n \t\t\t\tRTE_LOG(ERR, EAL,\n \t\t\t\t\t\"No more space in memseg lists, please increase %s\\n\",\n \t\t\t\t\tRTE_STR(CONFIG_RTE_MAX_MEMSEG_LISTS));\n-\t\t\t\treturn -1;\n+\t\t\t\tgoto out;\n \t\t\t}\n \t\t\tmsl = &mcfg->memsegs[msl_idx++];\n \n \t\t\tif (alloc_memseg_list(msl, pagesz, n_segs,\n \t\t\t\t\tsocket_id, cur_seglist))\n-\t\t\t\treturn -1;\n+\t\t\t\tgoto out;\n \n \t\t\tif (alloc_va_space(msl)) {\n \t\t\t\tRTE_LOG(ERR, EAL, \"Cannot allocate VA space for memseg list\\n\");\n-\t\t\t\treturn -1;\n+\t\t\t\tgoto out;\n \t\t\t}\n \t\t}\n \t}\n-\treturn 0;\n+\t/* we're successful */\n+\tret = 0;\n+out:\n+\tfree(memtypes);\n+\treturn ret;\n }\n \n static int\n",
    "prefixes": []
}