get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 30995,
    "url": "http://patches.dpdk.org/api/patches/30995/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1509076449-20542-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": "<1509076449-20542-1-git-send-email-liupengzhen3@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1509076449-20542-1-git-send-email-liupengzhen3@huawei.com",
    "date": "2017-10-27T03:54:09",
    "name": "[dpdk-dev] net/virtio: fix memory leak",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "a9fff3e62625f995ffd39a0609d73fd17bf0fd39",
    "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/1509076449-20542-1-git-send-email-liupengzhen3@huawei.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/30995/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/30995/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 24F2F1BBC2;\n\tFri, 27 Oct 2017 05:19:53 +0200 (CEST)",
            "from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190])\n\tby dpdk.org (Postfix) with ESMTP id 1808A1BBB0;\n\tFri, 27 Oct 2017 05:19:50 +0200 (CEST)",
            "from 172.30.72.60 (EHLO DGGEMS405-HUB.china.huawei.com)\n\t([172.30.72.60])\n\tby dggrg04-dlp.huawei.com (MOS 4.4.6-GA FastPath queued)\n\twith ESMTP id DJW45781; Fri, 27 Oct 2017 11:19:48 +0800 (CST)",
            "from localhost (10.175.126.192) by DGGEMS405-HUB.china.huawei.com\n\t(10.3.19.205) with Microsoft SMTP Server id 14.3.361.1;\n\tFri, 27 Oct 2017 11:17:50 +0800"
        ],
        "From": "Pengzhen Liu <liupengzhen3@huawei.com>",
        "To": "<thomas@monjalon.net>",
        "CC": "<dev@dpdk.org>, <liupengzhen3@huawei.com>, <stable@dpdk.org>",
        "Date": "Fri, 27 Oct 2017 11:54:09 +0800",
        "Message-ID": "<1509076449-20542-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.0A020206.59F2A5D5.000F, 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": "f174451a258df2c215d8ccad49dcc730",
        "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\nwhen function return,\nthis is a possible memory leak.\n\nFixes: 8ced1542f7a3 (\"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 a8ae788..59a76ad 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -1588,13 +1588,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+\t\t\tgoto 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+\t\tgoto out;\n \n \t/* Setup interrupt callback  */\n \tif (eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)\n@@ -1602,6 +1602,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+\trte_free(eth_dev->data->mac_addrs);\n+\treturn ret;\n }\n \n static int\n",
    "prefixes": [
        "dpdk-dev"
    ]
}