Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/30935/?format=api
http://patches.dpdk.org/api/patches/30935/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1509008662-18649-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": "<1509008662-18649-1-git-send-email-liupengzhen3@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1509008662-18649-1-git-send-email-liupengzhen3@huawei.com", "date": "2017-10-26T09:04:22", "name": "[dpdk-dev] net/virtio: fix memory leak", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "c8e56b121460cdbeb2e83420a75b37b694973f3d", "submitter": { "id": 874, "url": "http://patches.dpdk.org/api/people/874/?format=api", "name": "Pengzhen Liu", "email": "liupengzhen3@huawei.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1509008662-18649-1-git-send-email-liupengzhen3@huawei.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/30935/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/30935/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 034B91BA56;\n\tThu, 26 Oct 2017 10:29:02 +0200 (CEST)", "from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191])\n\tby dpdk.org (Postfix) with ESMTP id 7BA601BA42;\n\tThu, 26 Oct 2017 10:28:59 +0200 (CEST)", "from 172.30.72.58 (EHLO DGGEMS402-HUB.china.huawei.com)\n\t([172.30.72.58])\n\tby dggrg05-dlp.huawei.com (MOS 4.4.6-GA FastPath queued)\n\twith ESMTP id DJY48964; Thu, 26 Oct 2017 16:28:57 +0800 (CST)", "from localhost (10.175.126.192) by DGGEMS402-HUB.china.huawei.com\n\t(10.3.19.202) with Microsoft SMTP Server id 14.3.361.1;\n\tThu, 26 Oct 2017 16:28:03 +0800" ], "From": "Pengzhen Liu <liupengzhen3@huawei.com>", "To": "<thomas@monjalon.net>", "CC": "<dev@dpdk.org>, <liupengzhen3@huawei.com>, <stable@dpdk.org>", "Date": "Thu, 26 Oct 2017 17:04:22 +0800", "Message-ID": "<1509008662-18649-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.0A020204.59F19CC9.006D, 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": "52b5e7da4460c438bbe8873fde14ad7c", "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: 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, 4 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex c85c14d..c450f25 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -1587,13 +1587,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- goto out;\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- goto out;\n+\t\tgoto out;\n \n \t/* Setup interrupt callback */\n \tif (eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)\n@@ -1603,8 +1603,8 @@ static int virtio_dev_xstats_get_names(struct rte_eth_dev *dev,\n \treturn 0;\n \n out:\n- rte_free(eth_dev->data->mac_addrs);\n- return ret;\n+\trte_free(eth_dev->data->mac_addrs);\n+\treturn ret;\n }\n \n static int\n", "prefixes": [ "dpdk-dev" ] }{ "id": 30935, "url": "