get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 30933,
    "url": "http://patches.dpdk.org/api/patches/30933/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1509003174-15343-1-git-send-email-liupengzhen3@huawei.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": "<1509003174-15343-1-git-send-email-liupengzhen3@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1509003174-15343-1-git-send-email-liupengzhen3@huawei.com",
    "date": "2017-10-26T07:32:54",
    "name": "[dpdk-dev] net/virtio: fix memory leak",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1f53116033b7cae95e4d20d46e8ed006df364b9d",
    "submitter": {
        "id": 874,
        "url": "http://patches.dpdk.org/api/people/874/?format=api",
        "name": "Pengzhen Liu",
        "email": "liupengzhen3@huawei.com"
    },
    "delegate": {
        "id": 355,
        "url": "http://patches.dpdk.org/api/users/355/?format=api",
        "username": "yliu",
        "first_name": "Yuanhan",
        "last_name": "Liu",
        "email": "yuanhan.liu@linux.intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1509003174-15343-1-git-send-email-liupengzhen3@huawei.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/30933/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/30933/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 3F6211BA39;\n\tThu, 26 Oct 2017 08:56:49 +0200 (CEST)",
            "from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191])\n\tby dpdk.org (Postfix) with ESMTP id 35E411BA01;\n\tThu, 26 Oct 2017 08:56:46 +0200 (CEST)",
            "from 172.30.72.60 (EHLO DGGEMS401-HUB.china.huawei.com)\n\t([172.30.72.60])\n\tby dggrg05-dlp.huawei.com (MOS 4.4.6-GA FastPath queued)\n\twith ESMTP id DJY38091; Thu, 26 Oct 2017 14:56:44 +0800 (CST)",
            "from localhost (10.175.126.192) by DGGEMS401-HUB.china.huawei.com\n\t(10.3.19.201) with Microsoft SMTP Server id 14.3.361.1;\n\tThu, 26 Oct 2017 14:56:35 +0800"
        ],
        "From": "Pengzhen Liu <liupengzhen3@huawei.com>",
        "To": "<thomas@monjalon.net>",
        "CC": "<dev@dpdk.org>, <liupengzhen3@huawei.com>, <zhangsha.zhang@huawei.com>, \n\t<huangjian.huangjian@huawei.com>, <zangchuanqiang@huawei.com>,\n\t<stable@dpdk.org>",
        "Date": "Thu, 26 Oct 2017 15:32:54 +0800",
        "Message-ID": "<1509003174-15343-1-git-send-email-liupengzhen3@huawei.com>",
        "X-Mailer": "git-send-email 1.7.12.4",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.175.126.192]",
        "X-CFilter-Loop": "Reflected",
        "X-Mirapoint-Virus-RAPID-Raw": "score=unknown(0),\n\trefid=str=0001.0A020201.59F1872C.0071, ss=1, re=0.000, recu=0.000,\n\treip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0,\n\tso=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32",
        "X-Mirapoint-Loop-Id": "86c4198c33d60924fca28cdf64e8dedb",
        "Subject": "[dpdk-dev] [PATCH]  net/virtio: fix memory 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": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "In function eth_virtio_dev_init(), dynamic memory stored\nin \"eth_dev->data->mac_addrs\" variable and it is not freed whe function return,\nthis is a possible memory leak.\n\nFixes: 6b9ed026a870 (\"net/virtio: eth_dev->data->mac_addrs is not freed\")\nCc: stable@dpdk.org\nSigned-off-by: Pengzhen Liu <liupengzhen3@huawei.com>\n---\n drivers/net/virtio/virtio_ethdev.c | 8 ++++++--\n 1 file changed, 6 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex 0ec54a9..d9f186f 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -1586,13 +1586,13 @@ static int virtio_dev_xstats_get_names(struct rte_eth_dev *dev,\n \tif (!hw->virtio_user_dev) {\n \t\tret = vtpci_init(RTE_ETH_DEV_TO_PCI(eth_dev), hw);\n \t\tif (ret)\n-\t\t\treturn ret;\n+            goto out;\n \t}\n \n \t/* reset device and negotiate default features */\n \tret = virtio_init_device(eth_dev, VIRTIO_PMD_DEFAULT_GUEST_FEATURES);\n \tif (ret < 0)\n-\t\treturn ret;\n+        goto out;\n \n \t/* Setup interrupt callback  */\n \tif (eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)\n@@ -1600,6 +1600,10 @@ static int virtio_dev_xstats_get_names(struct rte_eth_dev *dev,\n \t\t\tvirtio_interrupt_handler, eth_dev);\n \n \treturn 0;\n+\n+out:\n+    rte_free(eth_dev->data->mac_addrs);\n+    return ret;\n }\n \n static int\n",
    "prefixes": [
        "dpdk-dev"
    ]
}