Show a patch.

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

{
    "id": 23426,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/23426/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23426/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20250522125521.6465-4-laurent.pinchart@ideasonboard.com>",
    "date": "2025-05-22T12:55:20",
    "name": "[3/4] gstreamer: Fix leak of GstQuery in error path",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "c9fbc6e711078099413239ce06547b302d55c812",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23426/mbox/",
    "series": [
        {
            "id": 5190,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5190/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5190",
            "date": "2025-05-22T12:55:17",
            "name": "gstreamer: Miscellaneous cleanups + one fix",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5190/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23426/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23426/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id F28AEC331D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 May 2025 12:55:34 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6184768D9A;\n\tThu, 22 May 2025 14:55:34 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B87EB68D9C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 May 2025 14:55:30 +0200 (CEST)",
            "from pendragon.ideasonboard.com\n\t(179.218-130-109.adsl-dyn.isp.belgacom.be [109.130.218.179])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9D9A6605;\n\tThu, 22 May 2025 14:55:08 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"pP0Eg3mK\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1747918508;\n\tbh=9CBxB4AKcCtw8eeFaSd3pROhHuvoNSzZesiLoYlauvU=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=pP0Eg3mKSkW6ZDo9j2j7w10vNIvX2ktJN3pdNvGYFC4uoDDYxzbcla/oeFWKYvQcN\n\tPX4Q8VjdxmP516QNMu5PTL7zgHfNyQe/tVSc7rK7l0TKARrzIyy826WoG53sS9MHlQ\n\tLTrZQazYw4yKkxyJSfTb90l2iST3zwpTXt80Z68o=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Hou Qi <qi.hou@nxp.com>,\n\tNicolas Dufresne <nicolas.dufresne@collabora.com>",
        "Subject": "[PATCH 3/4] gstreamer: Fix leak of GstQuery in error path",
        "Date": "Thu, 22 May 2025 14:55:20 +0200",
        "Message-ID": "<20250522125521.6465-4-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.49.0",
        "In-Reply-To": "<20250522125521.6465-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20250522125521.6465-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The gst_libcamera_create_video_pool() function leaks a GstQuery instance\nin an error path. Fix it with g_autoptr().\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/gstreamer/gstlibcamerasrc.cpp | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)",
    "diff": "diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\nindex 71f5700d9de7..380f8368af8b 100644\n--- a/src/gstreamer/gstlibcamerasrc.cpp\n+++ b/src/gstreamer/gstlibcamerasrc.cpp\n@@ -526,7 +526,7 @@ gst_libcamera_create_video_pool(GstLibcameraSrc *self,\n \t\t\t\tGstVideoInfo *info, GstPad *srcpad,\n \t\t\t\tGstCaps *caps)\n {\n-\tGstQuery *query = NULL;\n+\tg_autoptr(GstQuery) query = NULL;\n \tconst gboolean need_pool = true;\n \tgboolean has_video_meta = false;\n \tGstBufferPool *video_pool = NULL;\n@@ -571,7 +571,6 @@ gst_libcamera_create_video_pool(GstLibcameraSrc *self,\n \t\t}\n \t}\n \n-\tgst_query_unref(query);\n \treturn { video_pool, 0 };\n }\n \n",
    "prefixes": [
        "3/4"
    ]
}