Patch Detail
Show a patch.
GET /api/patches/13879/?format=api
{ "id": 13879, "url": "https://patchwork.libcamera.org/api/patches/13879/?format=api", "web_url": "https://patchwork.libcamera.org/patch/13879/", "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": "<20210921173955.20408-1-vedantparanjape160201@gmail.com>", "date": "2021-09-21T17:39:53", "name": "[libcamera-devel,v2,1/3] test: gstreamer_single_stream_test: Fix memory leak", "commit_ref": "ca9ea1f9ce37c70db885d14a1698063da04e0169", "pull_url": null, "state": "accepted", "archived": false, "hash": "aceb02434098164ad982b3aa5ed4cfd974a5c04b", "submitter": { "id": 85, "url": "https://patchwork.libcamera.org/api/people/85/?format=api", "name": "Vedant Paranjape", "email": "vedantparanjape160201@gmail.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/13879/mbox/", "series": [ { "id": 2542, "url": "https://patchwork.libcamera.org/api/series/2542/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2542", "date": "2021-09-21T17:39:53", "name": "[libcamera-devel,v2,1/3] test: gstreamer_single_stream_test: Fix memory leak", "version": 2, "mbox": "https://patchwork.libcamera.org/series/2542/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/13879/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/13879/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 0EF9ABF01C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Sep 2021 17:40:18 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 503266918C;\n\tTue, 21 Sep 2021 19:40:17 +0200 (CEST)", "from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com\n\t[IPv6:2607:f8b0:4864:20::42d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C91ED60247\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Sep 2021 19:40:15 +0200 (CEST)", "by mail-pf1-x42d.google.com with SMTP id w14so211962pfu.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Sep 2021 10:40:15 -0700 (PDT)", "from localhost.localdomain ([1.186.167.167])\n\tby smtp.googlemail.com with ESMTPSA id\n\tk190sm19800772pgc.11.2021.09.21.10.40.11\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 21 Sep 2021 10:40:13 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"J7c00G9k\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n\th=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=AjTUusiayGb8XNBYuRtkKRQ3PtUl1WcJg3+jWBjSajQ=;\n\tb=J7c00G9kQFqssmixNylVrlcnWDCBzlQpt59zi0Svb1b6BHKPDrbgLq2W/Fb1RZ1KET\n\tC0wbhLqGnnBlw9di+Hx3cl/8+brTQQhCtx37hNVTbDytI+dlJ5+WZK7bop+SyxMkL5JN\n\tQFHsgM9ThB/PRNNiI+cgvD5rpKGht4ZaqbR3gYFm5S2vcc1WiNMLo8u1LZHyW3sEJW9t\n\t6G3mgBCt+Nh7aaodGsTacGvv3DR4nHzrTDGdaqdZ6NM0lk48iyftC2we3zSEiTOP3/Ib\n\tDjKn48ZqAFNnvbuMiduDYd6RXCG2jn3VT13n+7QPkzhLW+koqPxCQ8N981RikOP0Cy16\n\t6elg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=AjTUusiayGb8XNBYuRtkKRQ3PtUl1WcJg3+jWBjSajQ=;\n\tb=D0GUSKSRBhMR2zuFe6Etxth0XfSPlVul69k2OTotrv6xfhrcNRXayAuSL/RxMz0aHQ\n\tXijv9u0d2cX+g3zSAetKzQ4zcxEjB3yAj1eomy/CmX9v5V7QJ2IBU3tQKAWvPiGhm2R2\n\th6gfg9ab3gHilxsQ1GkqZMC//IFCvrDD6YKNFtOebXzCSMG49OsUndK6AcDzqXUNC3il\n\tWRNL9mJaQwsKqSSHlacymus5J5zLw7jQeltLfhGMhH2cOhGd5OGD3Xq9ex299F3qg3T7\n\twao8jFrw9HEzq/Q7HwhAE2K8Idh15iodRAug12nqLi/w4jYrznk9/n1P5b0gYxuexZfs\n\tdrmA==", "X-Gm-Message-State": "AOAM531HrT/ilHtBAsfbU4Fk7JGYCEnSz9rMK3pf874kBTL9KTJAsvF6\n\tHYkmFWEQ6SyOdp2hKgfuA2eZmAGCbBvU2gdX", "X-Google-Smtp-Source": "ABdhPJzo0NTMaousF8N6WcsWTAjQ22RijK3BRoOsgfCTaKMaOqWmGlaSDKUWd0D4Y9IQIPom6wlVbA==", "X-Received": "by 2002:a62:ce0d:0:b0:438:71f1:4442 with SMTP id\n\ty13-20020a62ce0d000000b0043871f14442mr32215187pfg.21.1632246013857; \n\tTue, 21 Sep 2021 10:40:13 -0700 (PDT)", "From": "Vedant Paranjape <vedantparanjape160201@gmail.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 21 Sep 2021 23:09:53 +0530", "Message-Id": "<20210921173955.20408-1-vedantparanjape160201@gmail.com>", "X-Mailer": "git-send-email 2.25.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 1/3] test:\n\tgstreamer_single_stream_test: Fix memory leak", "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>", "Cc": "Nicolas Dufresne <nicolas.dufresne@collabora.com>,\n\tVedant Paranjape <vedantparanjape160201@gmail.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The test hold a valid reference to convert0_ and sink0_ but\nnot released. This results in a memory leak and can be checked\nvia valgrind. Drop the references with test cleanup() virtual\nfunction.\n\nValgrind log (glib and gst suppression files were used):\n==345380== LEAK SUMMARY:\n==345380== definitely lost: 1,688 bytes in 2 blocks\n==345380== indirectly lost: 7,069 bytes in 42 blocks\n\nThe patch fixes the leaks reported by valgrind above to:\n==348870== LEAK SUMMARY:\n==348870== definitely lost: 0 bytes in 0 blocks\n==348870== indirectly lost: 0 bytes in 0 blocks\n\nSigned-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\nReviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>\n---\n test/gstreamer/gstreamer_single_stream_test.cpp | 6 ++++++\n 1 file changed, 6 insertions(+)", "diff": "diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp\nindex 7292f3280617..2b561d6bf9f2 100644\n--- a/test/gstreamer/gstreamer_single_stream_test.cpp\n+++ b/test/gstreamer/gstreamer_single_stream_test.cpp\n@@ -72,6 +72,12 @@ protected:\n \t\treturn TestPass;\n \t}\n \n+\tvoid cleanup() override\n+\t{\n+\t\tg_clear_object(&convert0_);\n+\t\tg_clear_object(&sink0_);\n+\t}\n+\n private:\n \tGstElement *convert0_;\n \tGstElement *sink0_;\n", "prefixes": [ "libcamera-devel", "v2", "1/3" ] }