{"id":17726,"url":"https://patchwork.libcamera.org/api/1.1/patches/17726/?format=json","web_url":"https://patchwork.libcamera.org/patch/17726/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20221028115200.8138-3-naush@raspberrypi.com>","date":"2022-10-28T11:52:00","name":"[libcamera-devel,v1,2/2] pipeline: raspberrypi: Do not unconditionally free buffers on close","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"3c0122a844614bab435ca07c0537fa15082b74f3","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/1.1/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/17726/mbox/","series":[{"id":3585,"url":"https://patchwork.libcamera.org/api/1.1/series/3585/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3585","date":"2022-10-28T11:51:58","name":"Buffer cleanup fixes","version":1,"mbox":"https://patchwork.libcamera.org/series/3585/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/17726/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17726/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 353CABDB16\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 28 Oct 2022 11:52:09 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C94D862FDE;\n\tFri, 28 Oct 2022 13:52:08 +0200 (CEST)","from mail-wm1-x334.google.com (mail-wm1-x334.google.com\n\t[IPv6:2a00:1450:4864:20::334])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 234BB62FD5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Oct 2022 13:52:06 +0200 (CEST)","by mail-wm1-x334.google.com with SMTP id\n\tb20-20020a05600c4e1400b003cc28585e2fso3669369wmq.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Oct 2022 04:52:06 -0700 (PDT)","from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\ta5-20020adffb85000000b002366fb99cdasm3441686wrr.50.2022.10.28.04.52.04\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 28 Oct 2022 04:52:04 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666957928;\n\tbh=RdU01E7m/mPlZLCGKkhVgezt0HUMZDaZhZcV/C16tAc=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=EnWrMtLtcKNVA2p9neMtEVT8A8pcXNNkE+bTx0gQ8vt62Ba+q9kWG/PLTJUvjkJwq\n\tvMiOT7smsIpbDEmRdFSgDctto6A7z0VjhrceAwXjf+6t1K+1iRXhITvqDJthAHB2y8\n\tnPW0rd2kBLOn735J0xFmiBwXceeFXu7gtbCWBIi0Wc84ogbFh29whZQbpJmstX28Iv\n\twYNdjutahEErdy9XFeqpXhDcFpWfMs379PRpRbjkuMa40Zd9RsiKRwzIoyAHHU7LQN\n\tV13L6Tcj6zlUQ6w9rh85WmD88vS0fJh8ysVs/HYa/pE4c71XIRTR5I8eg975yOK8kr\n\t6Zd5cIceHI/Uw==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=5AiDnYESq1STHI/2ycKsedI2/UnLEEdz3AN1E5rBL5E=;\n\tb=qIZC9NcEfk0IxGRJAziXtl6lmOtPfX5TXPm11kQ9NVoMGYuXSZCJ9uSZ2jr+Go09MP\n\tyFkHiTXiqRss3CpFRIBSr1Hed+LnATQ+A6z6j2K6QZf1nGFU7Mhwaf5BlR0mwlF9BF/W\n\tTXmCbh/akbJyfxGBtsFGEDNjDpqksy95+qqqrTIBRnAXKF2MzwqWD+oP8hn2G4L4F1Yy\n\tnN9xclZXv1motUHMYALb/6bdfAe5IGhzjgNJmEG+NPk9zhFgCU1aZguYmSSe7KOdLvHo\n\tA2wNg4DNGHfj7+URG84vfW48oQVntG9xleczBUUib6x5eioi7q53I7IdZS2VeLMvGhfu\n\tyxMQ=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"qIZC9NcE\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=5AiDnYESq1STHI/2ycKsedI2/UnLEEdz3AN1E5rBL5E=;\n\tb=PEJkRkfgFI5BNQcrb7bynO0B1Dne+Xwdg/+0syeHGzgLL6EnC+2+jEI7GaSe63hbtW\n\tzrwsTeZLLSfM2jlISFma9aJcIF7XZqW2fe2iUNwFO8f4N5xhZOnrjNqYfnoLVdBgRWoH\n\tufYzxlbi6h7KfYybRxrHEKNMJBS9Mbqi40W8sGW2eY2ugIMW48Znkhn5lHy2IC4PiXEk\n\tkTHlRqQ/Qh05Oj4tX4c7nTE2s8h61OA/DYBMhm8JELTSjpY8y/uNpEad7WzVVpMnXfbf\n\tXh2zs0vYyaIVG4B4RR1GgSux7tPJ89RXPyNpgb2cyPIzZ/OiKS3wUUhpNxzsOGXirQBu\n\tYHOw==","X-Gm-Message-State":"ACrzQf2/anQheStILBoibR0rRA6flpUZUETbZhlDanz2GsWgwCCPdgc1\n\tJXmBCXKNnccUKwJsU8QlHlFz2tacyE9uXw==","X-Google-Smtp-Source":"AMsMyM64n8mWu9XaF0LfVVmh7PGFfOZmAY+iEojqQ0+HTRxKNgLLzDxTaYV956+m3ib8H9xeau7HMg==","X-Received":"by 2002:a05:600c:35cb:b0:3c6:e382:62fb with SMTP id\n\tr11-20020a05600c35cb00b003c6e38262fbmr8991671wmq.22.1666957925345; \n\tFri, 28 Oct 2022 04:52:05 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 28 Oct 2022 12:52:00 +0100","Message-Id":"<20221028115200.8138-3-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20221028115200.8138-1-naush@raspberrypi.com>","References":"<20221028115200.8138-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v1 2/2] pipeline: raspberrypi: Do not\n\tunconditionally free buffers on close","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>","From":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"When a camera is terminated, do not unconditionally free buffers in the\nRPiCameraData destructor. Otherwise, this causes harmless error log messages\nto be displayed if no buffer have previously been allocated.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)","diff":"diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 343f8cb2c7ed..31107e1338bf 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -191,7 +191,8 @@ public:\n \n \t~RPiCameraData()\n \t{\n-\t\tfreeBuffers();\n+\t\tif (buffersAllocated_)\n+\t\t\tfreeBuffers();\n \t}\n \n \tvoid freeBuffers();\n","prefixes":["libcamera-devel","v1","2/2"]}