Show a patch.

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

{
    "id": 43387,
    "url": "http://patches.dpdk.org/api/patches/43387/",
    "web_url": "http://patches.dpdk.org/patch/43387/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<20180726011548.97788-3-ajit.khaparde@broadcom.com>",
    "date": "2018-07-26T01:15:45",
    "name": "[2/5] net/bnxt: fix to free allocated memory",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "67a86fb576cb639cec763b69226bb0d7e1b27df4",
    "submitter": {
        "id": 501,
        "url": "http://patches.dpdk.org/api/people/501/",
        "name": "Ajit Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@intel.com"
    },
    "mbox": "http://patches.dpdk.org/patch/43387/mbox/",
    "series": [
        {
            "id": 779,
            "url": "http://patches.dpdk.org/api/series/779/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=779",
            "date": "2018-07-26T01:15:46",
            "name": "bnxt patchset",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/779/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/43387/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/43387/checks/",
    "tags": {},
    "headers": {
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "To": "dev@dpdk.org",
        "In-Reply-To": "<20180726011548.97788-1-ajit.khaparde@broadcom.com>",
        "Message-Id": "<20180726011548.97788-3-ajit.khaparde@broadcom.com>",
        "X-Mailer": "git-send-email 2.15.2 (Apple Git-101.1)",
        "DKIM-Filter": "OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 11B8730C026",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com;\n\ts=dkimrelay; t=1532567753;\n\tbh=ZnJYEYqXuAhWCRqhj8g67nvErVk2rVlS3EP8nfjXkM4=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=IXYXhwZiSrPUnTc39sj8+npgqpSmzg8HFolvJR+0DQ/5zW3PTy2gYQR4sEkV9YJny\n\thtb7HzWoet4yNaiembSkp/CC3jRBixSEnVdZymJg2eJ2rhKc81cr6L8zq9AYFLQAlZ\n\t/mVyn4pyMtusHc5lk9q3OrZwiC9wfWE3Jo4eLvrg=",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-BeenThere": "dev@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5889D34EF;\n\tThu, 26 Jul 2018 03:16:11 +0200 (CEST)",
            "from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com\n\t[192.19.229.170]) by dpdk.org (Postfix) with ESMTP id AA4D825D9;\n\tThu, 26 Jul 2018 03:15:59 +0200 (CEST)",
            "from nis-sj1-27.broadcom.com (nis-sj1-27.lvn.broadcom.net\n\t[10.75.144.136])\n\tby rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 11B8730C026;\n\tWed, 25 Jul 2018 18:15:53 -0700 (PDT)",
            "from C02VPB22HTD6.vpn.broadcom.net (unknown [10.10.118.171])\n\tby nis-sj1-27.broadcom.com (Postfix) with ESMTP id C8E56AC06AD;\n\tWed, 25 Jul 2018 18:15:52 -0700 (PDT)"
        ],
        "Subject": "[dpdk-dev] [PATCH 2/5] net/bnxt: fix to free allocated memory",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Cc": "stable@dpdk.org",
        "Precedence": "list",
        "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>",
        "References": "<20180726011548.97788-1-ajit.khaparde@broadcom.com>",
        "X-Original-To": "patchwork@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Errors-To": "dev-bounces@dpdk.org",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Delivered-To": "patchwork@dpdk.org",
        "Date": "Wed, 25 Jul 2018 18:15:45 -0700",
        "X-Mailman-Version": "2.1.15"
    },
    "content": "In some cases we may not be freeing up memory allocated for certain\nNVM commands because the code might have bailed out before reaching\nrte_free(). This patch moves some code around to ensure the allocated\nmemory is freed before exiting the function.\n\nFixes: 19e6af01bb36 (\"net/bnxt: support get/set EEPROM\")\nCc: stable@dpdk.org\n\nReviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>\nReviewed-by: Ray Jui <ray.jui@broadcom.com>\nReviewed-by: Michael Wildt <michael.wildt@broadcom.com>\nReviewed-by: Randy Schacher <stuart.schacher@broadcom.com>\nSigned-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>\n---\n drivers/net/bnxt/bnxt_hwrm.c | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c\nindex 69c83cdab..3f8e26ca3 100644\n--- a/drivers/net/bnxt/bnxt_hwrm.c\n+++ b/drivers/net/bnxt/bnxt_hwrm.c\n@@ -3353,13 +3353,12 @@ int bnxt_get_nvram_directory(struct bnxt *bp, uint32_t len, uint8_t *data)\n \treq.host_dest_addr = rte_cpu_to_le_64(dma_handle);\n \trc = bnxt_hwrm_send_message(bp, &req, sizeof(req));\n \n-\tHWRM_CHECK_RESULT();\n-\tHWRM_UNLOCK();\n-\n \tif (rc == 0)\n \t\tmemcpy(data, buf, len > buflen ? buflen : len);\n \n \trte_free(buf);\n+\tHWRM_CHECK_RESULT();\n+\tHWRM_UNLOCK();\n \n \treturn rc;\n }\n@@ -3391,12 +3390,13 @@ int bnxt_hwrm_get_nvram_item(struct bnxt *bp, uint32_t index,\n \treq.offset = rte_cpu_to_le_32(offset);\n \treq.len = rte_cpu_to_le_32(length);\n \trc = bnxt_hwrm_send_message(bp, &req, sizeof(req));\n-\tHWRM_CHECK_RESULT();\n-\tHWRM_UNLOCK();\n \tif (rc == 0)\n \t\tmemcpy(data, buf, length);\n \n \trte_free(buf);\n+\tHWRM_CHECK_RESULT();\n+\tHWRM_UNLOCK();\n+\n \treturn rc;\n }\n \n@@ -3451,10 +3451,10 @@ int bnxt_hwrm_flash_nvram(struct bnxt *bp, uint16_t dir_type,\n \n \trc = bnxt_hwrm_send_message(bp, &req, sizeof(req));\n \n+\trte_free(buf);\n \tHWRM_CHECK_RESULT();\n \tHWRM_UNLOCK();\n \n-\trte_free(buf);\n \treturn rc;\n }\n \n",
    "prefixes": [
        "2/5"
    ]
}