Show a patch.

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

{
    "id": 9015,
    "url": "https://patchwork.libcamera.org/api/patches/9015/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/9015/",
    "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": "<20200727123247.20412-1-email@uajain.com>",
    "date": "2020-07-27T12:32:59",
    "name": "[libcamera-devel] qcam: Fix camera reference leak on hot-unplug",
    "commit_ref": "c8edfe29c185dade3aa584363d91643755fe7e02",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "6fc8b8e0bd7da2d2d81f895f894e4d3330d8876a",
    "submitter": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/people/1/?format=api",
        "name": "Umang Jain",
        "email": "email@uajain.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/9015/mbox/",
    "series": [
        {
            "id": 1150,
            "url": "https://patchwork.libcamera.org/api/series/1150/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1150",
            "date": "2020-07-27T12:32:59",
            "name": "[libcamera-devel] qcam: Fix camera reference leak on hot-unplug",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1150/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/9015/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/9015/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 32476BD86F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Jul 2020 12:33:04 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A63BB613AA;\n\tMon, 27 Jul 2020 14:33:03 +0200 (CEST)",
            "from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 524B260939\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jul 2020 14:33:01 +0200 (CEST)",
            "by filterdrecv-p3las1-7754f7d4cc-l8z88 with SMTP id\n\tfilterdrecv-p3las1-7754f7d4cc-l8z88-20-5F1EC97A-88\n\t2020-07-27 12:32:58.965596672 +0000 UTC m=+2744361.226590960",
            "from mail.uajain.com (unknown)\n\tby ismtpd0001p1maa1.sendgrid.net (SG) with ESMTP id\n\tkTCM2PgzR8a9L6WB-R67Yg for <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jul 2020 12:32:58.285 +0000 (UTC)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=uajain.com header.i=@uajain.com\n\theader.b=\"gl+Kmvn9\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com;\n\th=from:subject:mime-version:to:cc:content-transfer-encoding:\n\tcontent-type;\n\ts=s1; bh=tLpeChWmqu96NUTJsxWK+mIuZSWujYQgBz3DWOCpQgE=;\n\tb=gl+Kmvn9YtIKduW/p7NGaJoJv6K2nVVLOrKeYEwXWv7Q/6dA0dYqvccblwIEnPVBS6oZ\n\tGhAknJzf8bqMXlbz7WaP05jZd6awBkx3/KTLRaKyEBo8ZQUKCDvsaKgCndBDsV4CcyLg+q\n\tO1K3c4YphcThce/4KrDedRUVkBIj7PF4o=",
        "From": "Umang Jain <email@uajain.com>",
        "Date": "Mon, 27 Jul 2020 12:32:59 +0000 (UTC)",
        "Message-Id": "<20200727123247.20412-1-email@uajain.com>",
        "Mime-Version": "1.0",
        "X-SG-EID": "1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcp6CL6ozs3IeZvk96OtB41JK3zJzypOxB6I5DMBQySpYkFUGxUA6Ym/uFJj5EKuxoeLM5CkrZB50eopQxSZyCy/gaJj2p4Yr5qSvyl+OgiZ0ApUC86zLcKIKl+YsFJjpJdQAkFh+h7BvryEeAul7teLriGw3uk+OYOgdjt3R2n/PpdX5ST8fv21jxMjvAVu9GGUb1+kzK1x/QEDH0Qa1BIg==",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[libcamera-devel] [PATCH] qcam: Fix camera reference leak on\n\thot-unplug",
        "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>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "If the currently streaming camera is hot-unplugged,\na camera reference was still held by MainWindow::camera_,\npreventing it to be destructed, until qcam window is\nclosed. Plug the leak in the hot-unplug handler itself.\n\nSigned-off-by: Umang Jain <email@uajain.com>\n---\n src/qcam/main_window.cpp | 2 ++\n 1 file changed, 2 insertions(+)",
    "diff": "diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp\nindex 7bc1360..c8298ec 100644\n--- a/src/qcam/main_window.cpp\n+++ b/src/qcam/main_window.cpp\n@@ -587,6 +587,8 @@ void MainWindow::processHotplug(HotplugEvent *e)\n \t\t/* Check if the currently-streaming camera is removed. */\n \t\tif (camera == camera_.get()) {\n \t\t\ttoggleCapture(false);\n+\t\t\tcamera_->release();\n+\t\t\tcamera_.reset();\n \t\t\tcameraCombo_->setCurrentIndex(0);\n \t\t}\n \n",
    "prefixes": [
        "libcamera-devel"
    ]
}