Show a patch.

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

{
    "id": 1004,
    "url": "https://patchwork.libcamera.org/api/patches/1004/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/1004/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20190416134210.21097-4-jacopo@jmondi.org>",
    "date": "2019-04-16T13:42:06",
    "name": "[libcamera-devel,v6,3/7] libcamera: camera: Don't call freeBuffer() on allocateBuffer() error",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "10547464ae0190972ba128c938e4fbe24625e026",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/1004/mbox/",
    "series": [
        {
            "id": 252,
            "url": "https://patchwork.libcamera.org/api/series/252/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=252",
            "date": "2019-04-16T13:42:03",
            "name": "libcamera: Framework changes to prepare for multiple streams support",
            "version": 6,
            "mbox": "https://patchwork.libcamera.org/series/252/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/1004/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/1004/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net\n\t[217.70.183.199])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 83F5660DC4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Apr 2019 15:41:27 +0200 (CEST)",
            "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 199C6FF809;\n\tTue, 16 Apr 2019 13:41:26 +0000 (UTC)"
        ],
        "X-Originating-IP": "2.224.242.101",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 16 Apr 2019 15:42:06 +0200",
        "Message-Id": "<20190416134210.21097-4-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20190416134210.21097-1-jacopo@jmondi.org>",
        "References": "<20190416134210.21097-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v6 3/7] libcamera: camera: Don't call\n\tfreeBuffer() on allocateBuffer() error",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "X-List-Received-Date": "Tue, 16 Apr 2019 13:41:28 -0000"
    },
    "content": "Do not assume the freeBuffer() function can handle allocateBuffer()\nmethod failures, as error handling and clean up should be performed\nby allocateBuffer() method itself.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/camera.cpp | 1 -\n 1 file changed, 1 deletion(-)",
    "diff": "diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\nindex 21caa24b90b5..2d0a80664214 100644\n--- a/src/libcamera/camera.cpp\n+++ b/src/libcamera/camera.cpp\n@@ -650,7 +650,6 @@ int Camera::allocateBuffers()\n \tint ret = pipe_->allocateBuffers(this, activeStreams_);\n \tif (ret) {\n \t\tLOG(Camera, Error) << \"Failed to allocate buffers\";\n-\t\tfreeBuffers();\n \t\treturn ret;\n \t}\n \n",
    "prefixes": [
        "libcamera-devel",
        "v6",
        "3/7"
    ]
}