get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134745,
    "url": "http://patches.dpdk.org/api/patches/134745/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/ae01e7af24ef6fb3b308df7307e70131831ab2af.1701427071.git.wangyunjian@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": "<ae01e7af24ef6fb3b308df7307e70131831ab2af.1701427071.git.wangyunjian@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/ae01e7af24ef6fb3b308df7307e70131831ab2af.1701427071.git.wangyunjian@huawei.com",
    "date": "2023-12-01T10:47:11",
    "name": "[1/1] net/ixgbe: fix memoy leak after device init failure",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "71aabc0040a3488974f54337e61c4d6dd33738b4",
    "submitter": {
        "id": 551,
        "url": "http://patches.dpdk.org/api/people/551/?format=api",
        "name": "Yunjian Wang",
        "email": "wangyunjian@huawei.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/ae01e7af24ef6fb3b308df7307e70131831ab2af.1701427071.git.wangyunjian@huawei.com/mbox/",
    "series": [
        {
            "id": 30431,
            "url": "http://patches.dpdk.org/api/series/30431/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30431",
            "date": "2023-12-01T10:47:11",
            "name": "[1/1] net/ixgbe: fix memoy leak after device init failure",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/30431/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/134745/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/134745/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 73F9F4341B;\n\tFri,  1 Dec 2023 11:47:15 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5FD2B42FAB;\n\tFri,  1 Dec 2023 11:47:15 +0100 (CET)",
            "from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])\n by mails.dpdk.org (Postfix) with ESMTP id 247F140289;\n Fri,  1 Dec 2023 11:47:14 +0100 (CET)",
            "from dggpemm500008.china.huawei.com (unknown [172.30.72.54])\n by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4ShV9V540GzvQwN;\n Fri,  1 Dec 2023 18:46:38 +0800 (CST)",
            "from localhost (10.174.242.157) by dggpemm500008.china.huawei.com\n (7.185.36.136) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 1 Dec\n 2023 18:47:12 +0800"
        ],
        "From": "Yunjian Wang <wangyunjian@huawei.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<qiming.yang@intel.com>, <wenjun1.wu@intel.com>, <xudingke@huawei.com>,\n <jerry.lilijun@huawei.com>, Yunjian Wang <wangyunjian@huawei.com>,\n <stable@dpdk.org>",
        "Subject": "[PATCH 1/1] net/ixgbe: fix memoy leak after device init failure",
        "Date": "Fri, 1 Dec 2023 18:47:11 +0800",
        "Message-ID": "\n <ae01e7af24ef6fb3b308df7307e70131831ab2af.1701427071.git.wangyunjian@huawei.com>",
        "X-Mailer": "git-send-email 1.9.5.msysgit.1",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.174.242.157]",
        "X-ClientProxiedBy": "dggems703-chm.china.huawei.com (10.3.19.180) To\n dggpemm500008.china.huawei.com (7.185.36.136)",
        "X-CFilter-Loop": "Reflected",
        "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": "In ixgbe_ipsec_ctx_create() allocated memory for the 'security_ctx',\nwe should free it when errors occur, otherwise it will lead\nto memory leak.\n\nFixes: 9a0752f498d2 (\"net/ixgbe: enable inline IPsec\")\nCc: stable@dpdk.org\n\nSigned-off-by: Yunjian Wang <wangyunjian@huawei.com>\n---\n drivers/net/ixgbe/ixgbe_ethdev.c | 17 +++++++++++++----\n 1 file changed, 13 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c\nindex d6cf00317e..a32d3a6d7c 100644\n--- a/drivers/net/ixgbe/ixgbe_ethdev.c\n+++ b/drivers/net/ixgbe/ixgbe_ethdev.c\n@@ -1190,7 +1190,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)\n \tdiag = ixgbe_validate_eeprom_checksum(hw, &csum);\n \tif (diag != IXGBE_SUCCESS) {\n \t\tPMD_INIT_LOG(ERR, \"The EEPROM checksum is not valid: %d\", diag);\n-\t\treturn -EIO;\n+\t\tret = -EIO;\n+\t\tgoto err_exit;\n \t}\n \n #ifdef RTE_LIBRTE_IXGBE_BYPASS\n@@ -1228,7 +1229,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)\n \t\tPMD_INIT_LOG(ERR, \"Unsupported SFP+ Module\");\n \tif (diag) {\n \t\tPMD_INIT_LOG(ERR, \"Hardware Initialization Failure: %d\", diag);\n-\t\treturn -EIO;\n+\t\tret = -EIO;\n+\t\tgoto err_exit;\n \t}\n \n \t/* Reset the hw statistics */\n@@ -1248,7 +1250,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)\n \t\t\t     \"Failed to allocate %u bytes needed to store \"\n \t\t\t     \"MAC addresses\",\n \t\t\t     RTE_ETHER_ADDR_LEN * hw->mac.num_rar_entries);\n-\t\treturn -ENOMEM;\n+\t\tret = -ENOMEM;\n+\t\tgoto err_exit;\n \t}\n \t/* Copy the permanent MAC address */\n \trte_ether_addr_copy((struct rte_ether_addr *)hw->mac.perm_addr,\n@@ -1263,7 +1266,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)\n \t\t\t     RTE_ETHER_ADDR_LEN * IXGBE_VMDQ_NUM_UC_MAC);\n \t\trte_free(eth_dev->data->mac_addrs);\n \t\teth_dev->data->mac_addrs = NULL;\n-\t\treturn -ENOMEM;\n+\t\tret = -ENOMEM;\n+\t\tgoto err_exit;\n \t}\n \n \t/* initialize the vfta */\n@@ -1347,6 +1351,11 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)\n \teth_dev->data->mac_addrs = NULL;\n \trte_free(eth_dev->data->hash_mac_addrs);\n \teth_dev->data->hash_mac_addrs = NULL;\n+err_exit:\n+#ifdef RTE_LIB_SECURITY\n+\trte_free(eth_dev->security_ctx);\n+\teth_dev->security_ctx = NULL;\n+#endif\n \treturn ret;\n }\n \n",
    "prefixes": [
        "1/1"
    ]
}