get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 108031,
    "url": "http://patches.dpdk.org/api/patches/108031/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/tencent_EAF6EFC9911811CF98099EEC539908751D07@qq.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": "<tencent_EAF6EFC9911811CF98099EEC539908751D07@qq.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/tencent_EAF6EFC9911811CF98099EEC539908751D07@qq.com",
    "date": "2022-02-22T18:17:59",
    "name": "[01/20] baseband/acc100: fix a memory leak in acc100 queue setup",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "b2cb8414100d0e23185936ccdfd838821f9c505d",
    "submitter": {
        "id": 2458,
        "url": "http://patches.dpdk.org/api/people/2458/?format=api",
        "name": "Weiguo Li",
        "email": "liwg06@foxmail.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/tencent_EAF6EFC9911811CF98099EEC539908751D07@qq.com/mbox/",
    "series": [
        {
            "id": 21799,
            "url": "http://patches.dpdk.org/api/series/21799/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=21799",
            "date": "2022-02-22T18:17:58",
            "name": "fix memory leaks in error handling",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/21799/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/108031/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/108031/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 62E50A034E;\n\tTue, 22 Feb 2022 19:18:39 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4B90541148;\n\tTue, 22 Feb 2022 19:18:39 +0100 (CET)",
            "from out203-205-221-164.mail.qq.com (out203-205-221-164.mail.qq.com\n [203.205.221.164])\n by mails.dpdk.org (Postfix) with ESMTP id 7BB0E41147\n for <dev@dpdk.org>; Tue, 22 Feb 2022 19:18:36 +0100 (CET)",
            "from localhost.localdomain ([111.193.130.237])\n by newxmesmtplogicsvrszc6.qq.com (NewEsmtp) with SMTP\n id 49223207; Wed, 23 Feb 2022 02:18:18 +0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com;\n s=s201512; t=1645553912;\n bh=3Xwe1yt9pooF1LxFuiCw3cs3ald74sLnBjqf9d7FZC0=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References;\n b=Z3ePABQAg4J6PrknXy2pNeWDR7larGAUguI0nuqwxWmNsQo2jZxc7ObFIXbKaGHQI\n pOj9zOwn3sdAg9VmNWp8i/ohJ49NgqAQJvahQsxuXwkDJnGu7itwdMRyFZVsvrmru8\n w+5EQF7Br4x+M5cfLYkdAw5Zx4S8M1dUPQi4x5RA=",
        "X-QQ-mid": "xmsmtpt1645553908txn4yah3y",
        "Message-ID": "<tencent_EAF6EFC9911811CF98099EEC539908751D07@qq.com>",
        "X-QQ-XMAILINFO": "ND42uzdxTIzr2YEOj0mwip26hYkQOKN0Zxxf1g6Odo1xq3Pd2Ey1uZohbayMsJ\n GmQGn43fm8ze8SQ4Pvgw75DnAXXcbBjSredoHYPnlJD0kXwOF7IN5+VyqfHdOCAtP2UGf0j2yFf/\n Z32JR/NkvQJqFB+ns+2YzLjYVSPhISa/Oz5Ws+VSfvLa2HZZibHCnzAgQDajT+miYMrhaUXasJLp\n 5u0kij0rwhS8gXzz/L+MjgEekHGAAxo+71RztnxPuDVlXIclC5HPF5DJT3D2AqS8CInMSvBHTqXr\n YqJrpOXC6SVGtid5wun1D/9vBGOw1oFzSo/oU2Ru/jcMUS5rxosSi7//T10pixDakj/wAAn+h8UG\n Sk6MfbLiF2PnzcI3yWNAMOBjhbf7L7KLDxu0AA/wrevfaNkjYbjSXaX5x/ZFU3bgq783oz3juSIx\n w0gK8jpiMxda++SI9AAK1dzbqcHh45poKC4Bbr4v0RH+zj+kOmve+VUVtJtQbX0pyrk0qSYIllcv\n 3Al3ECDb3C6welCfni+rW2jq4O7LZzIFcwSH5qE9mS3W9VohBBt9IAitoXRcd/ZpdncPhmDD/ar+\n MpXgjbzDYIp8Zkmi6kh4uGHRvDG4CDhFIK0y1hFvaN+nMh2LZmU0j5+VpdH6SU6xeuNaUGm+CLfx\n 3DHhLqOtdLBE4XVpxqZN1aCi5AYNzO/U9LLfCcTxszWQ4ug1l6otID4OGqkq7F/LWNVaUp+B0Frk\n GnfUFE2IS5FHa8vl2N+RiFHuogxwFkr8ziayT4hzS4tt2B7sy2H+hlwoTVuFtj9ou1zMgPDAVNGc\n Hhe5bOrq1/AZpO6aVuiAPGpf+Z8ZHrvHZ67hxkY8bm1wzoliuLTER8zJb/16Tcc3U=",
        "From": "Weiguo Li <liwg06@foxmail.com>",
        "To": "dev@dpdk.org",
        "Cc": "adypodoman@gmail.com, xiaoyun.li@intel.com, tianfei.zhang@intel.com,\n bruce.richardson@intel.com, ivan.malov@oktetlabs.ru, jgrajcia@cisco.com,\n hkalra@marvell.com, ying.a.wang@intel.com, ting.xu@intel.com,\n simei.su@intel.com, qiming.yang@intel.com, motih@mellanox.com,\n shreyansh.jain@nxp.com, skoteshwar@marvell.com, stephen@networkplumber.org,\n kalesh-anakkur.purayil@broadcom.com, somnath.kotur@broadcom.com,\n declan.doherty@intel.com, gakhil@marvell.com, nicolas.chautru@intel.com",
        "Subject": "[PATCH 01/20] baseband/acc100: fix a memory leak in acc100 queue\n setup",
        "Date": "Wed, 23 Feb 2022 02:17:59 +0800",
        "X-OQ-MSGID": "\n <39845772f05511dd6d3bb6cce91d0313081cd007.1645551559.git.liwg06@foxmail.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<cover.1645551559.git.liwg06@foxmail.com>",
        "References": "<cover.1645551559.git.liwg06@foxmail.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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"
    },
    "content": "We allocated memory for 'q', we don't free it when null check for 'd' fails\nand it will lead to memory leak.\nWe can move null check for 'd' ahead of the memory allocation to fix it.\n\nFixes: 060e76729302 (\"baseband/acc100: add queue configuration\")\n\nSigned-off-by: Weiguo Li <liwg06@foxmail.com>\n---\n drivers/baseband/acc100/rte_acc100_pmd.c | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c\nindex f86474f7e0..25e9e6435f 100644\n--- a/drivers/baseband/acc100/rte_acc100_pmd.c\n+++ b/drivers/baseband/acc100/rte_acc100_pmd.c\n@@ -824,6 +824,10 @@ acc100_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,\n \tstruct acc100_queue *q;\n \tint16_t q_idx;\n \n+\tif (d == NULL) {\n+\t\trte_bbdev_log(ERR, \"Undefined device\");\n+\t\treturn -ENODEV;\n+\t}\n \t/* Allocate the queue data structure. */\n \tq = rte_zmalloc_socket(dev->device->driver->name, sizeof(*q),\n \t\t\tRTE_CACHE_LINE_SIZE, conf->socket);\n@@ -831,10 +835,6 @@ acc100_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,\n \t\trte_bbdev_log(ERR, \"Failed to allocate queue memory\");\n \t\treturn -ENOMEM;\n \t}\n-\tif (d == NULL) {\n-\t\trte_bbdev_log(ERR, \"Undefined device\");\n-\t\treturn -ENODEV;\n-\t}\n \n \tq->d = d;\n \tq->ring_addr = RTE_PTR_ADD(d->sw_rings, (d->sw_ring_size * queue_id));\n",
    "prefixes": [
        "01/20"
    ]
}