From patchwork Sun Nov 21 19:57:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hilliard X-Patchwork-Id: 1557808 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=R43I0UAF; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=a8EGW1AR; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::53c; helo=mail-pg1-x53c.google.com; envelope-from=swupdate+bncbcl4hcw73qcbblgj5kgamgqetarutdq@googlegroups.com; receiver=) Received: from mail-pg1-x53c.google.com (mail-pg1-x53c.google.com [IPv6:2607:f8b0:4864:20::53c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Hy1Qn5kXGz9t0k for ; Mon, 22 Nov 2021 06:57:36 +1100 (AEDT) Received: by mail-pg1-x53c.google.com with SMTP id e4-20020a630f04000000b002cc40fe16afsf5735389pgl.23 for ; Sun, 21 Nov 2021 11:57:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1637524652; cv=pass; d=google.com; s=arc-20160816; b=vTzqOj3aTp8PHT30KIXarB+rb2SQ01u0XYpRMJg50+2a48nHT1HXxTGRqVZK8VSZxL Wau34x9Cx2AJvsjMgIV4zPaaLQwQaDJ6nYXNX18AuacGYEeBm59S8Nj3IzvUGNcEqjBf KAGSx1EuRKscEP2MEvpJmGcawp1fr/Esq4vGj0UG4eq3O4Y8RoTyMAfXmrQr6QcZPlqS T/euks0Uh7z8F6Ym3JUaUmfqOs54RIZqXUDw/vm8wTTzehc2eUbw10SLl1jGje1tLNPE mLYLGbW8krSeE/nMo3LbgYJeoRT33ZZSTGP2PrWficrQ6C8LJeeE3nbcedlFsh7qktVd jKDw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature:dkim-signature; bh=FbzkCBSVH9esyzdSNnQKWpvv2qKTMTmqGeH+oJYdaCQ=; b=lmslwYFI/iXltS+01sD+jm3NX53aovqYMOJSOdTQeemHl8ruM8F9j5jHFmpImmrpiP 6ieVr0QDVXuYcsw2A4oTD8ORcHoLZNxpqq9AWgfslz98f2xf6Nz92rOW23mGkaU/+Nl+ emsl0ZgrvyCjxFcqe6E27H8lCN+z8eBJK6Yf34CVA9Wc+HqaUr5uwRYnAGlvlDpOiSQk XTSjBAa46LbArz87pCLUmgclKZdm+JbAvFmsATw7uBlNgIh7pbxxPBzh6sFp/3mASKgv ygrzUER6TtwMqA6vxhPx1Qbgj1szQBnFMvLu0tQh1q+sdSdKdWGctMGUNHecvXixN3rG ArJQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bevxEQUK; spf=pass (google.com: domain of james.hilliard1@gmail.com designates 2607:f8b0:4864:20::d2c as permitted sender) smtp.mailfrom=james.hilliard1@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=FbzkCBSVH9esyzdSNnQKWpvv2qKTMTmqGeH+oJYdaCQ=; b=R43I0UAF+K27UDALLI1ze3S7R0NyPThA9KH4VRmVctsq4vEGzWoN3fMBKb9kEnDJRi 1lwsQunDCg3dfvC4CE+mgq5qMfNjdh0Qh1ZBPXlLSA8QLVV2OAVz71VXzwFNHeQSQd6M qqRD7MqdzCteEorJ7svEtUskCNvDO8SVhwhQgGtbL7+fhiQz+2be95QuZlAen67SRGsH AglM94F45SXAZ50qdR3ZIeOiYK0oTl5VlLfq2qGuWpnS+f/2dNrCfseJqQcCDfJDaNAX 8TKoP7yezX+qVN4QIy3GIeLnGj+jUNfB7FGBqdNFF/icL5Oj2pxuJ4Jv5EcDgxx+OOUC BeUQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=FbzkCBSVH9esyzdSNnQKWpvv2qKTMTmqGeH+oJYdaCQ=; b=a8EGW1ARypXWTcNNsiXdhLHfKLVjvh4rURNQl6YpwaRfb05QuBlT7m6JCTlOputeY8 zgYvJPu2sDSrP9mJaCZvw769xPRIzVD57It0J9YI+oyMGFQ3xj1rBed/RC0oiZ36Hyy6 /KKl64SL/sf2yzFWy5hMKd8+V8033BvteM2UenZB3pAZRUcjyHyOuh99x3oD1DDgwc/6 qldY4y0SNo/p/z7DaIFaOdFieU84J+Wm9rekBzVK3oL0HzgV6h73sIg1jWdDDIjH3/CR rLtq9iG/dH67Kd+8WyK5PhpkM6hCHm+6FCEGrb4jfLV35xQg5LmR/J3sT9SZaBanLhHw 7FbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=FbzkCBSVH9esyzdSNnQKWpvv2qKTMTmqGeH+oJYdaCQ=; b=LDpMs2eM8N3nIKEpVgBiMpiJtxnjcptUoNrT5vKMgpRl6b2mdZVqT+Tg9dz04dWUui 4SeUFf26NI3akOOrywiBvPNj4Cn5mDkfXDgdS0+ZDNEuRjCI4evkC5vnr0Dt000aY4VH 7WOq2tUG4vaQnNVi/w0flsdpRm4iDRg0gWjqld7Bz1+sbTQ33gaggxAlR0f2BQ2thBwh 0LsT4w2TP+EsLRdmGN1iURyxRJtIgX1Lc17u0qEPcIWM3mD8nclsRcfSEs0uEZpg9ozt 0M6y7lrsGU4xpUBARlL1jKHjAsWSiTGuTcddc43f1LpLRRtHgWlN/fMpXjjzkk3w9I0e dbWg== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM531yThRCIE39mGs6JWw5Z7YmmFagaA0qq1rbnoUGwq/484IgpOt3 1dTYBF+YfRyZGYS7G0KDaXg= X-Google-Smtp-Source: ABdhPJwmBYs2wkBZ/jLSP7kc+oozukk1Nm7reMjqptBx10FqAmgiqSCQzo0NWzK1L0N50d/y/zkb+Q== X-Received: by 2002:a17:902:b60b:b0:144:e601:de5 with SMTP id b11-20020a170902b60b00b00144e6010de5mr30774656pls.36.1637524652450; Sun, 21 Nov 2021 11:57:32 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a63:4e03:: with SMTP id c3ls1102426pgb.1.gmail; Sun, 21 Nov 2021 11:57:31 -0800 (PST) X-Received: by 2002:a63:a12:: with SMTP id 18mr29172566pgk.171.1637524651661; Sun, 21 Nov 2021 11:57:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637524651; cv=none; d=google.com; s=arc-20160816; b=qJZhRDjaLR+t3ZPoAq1iAHXiTIo3q+UMaQ5QyAmPvetrQLFpWUyUx1ZNAMfYU2UNr/ H3Qqmz0EvenUu4/Ai1PSq73M4gTsJ06obBfjo+PieF3014wr5ah/9oLgcvUHPiOKLtNf boutArgUV2/gsdn0OGZXWQGJHvf3zelXWB4EY1xTh7uwKstMMEuUEkKLwc2FRDmzefEH vpx8AH2gJ8sGzL061H3N4zmXRfH3WL18HDy0Cvdy8VHqZ9we0Hzg31PnTXHfVNSxAgvJ O/l7dqsivhrqwjBILm9/dRqAumPKgONiob5UkeLZTFoJBPffQCp5FdnVIeUOZz410wDz VlzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=gPTA1eRME6l3iYjD+TYwmqolYpqbUWoQkxDfxBMQkJ8=; b=UC4l9fF+BwjgHJf14LgldRCeLUQFE8NBWoJCC7nbaKyLEC6/9sO9GpNqAeC8bGLexj sPJHGEGCmDCfWSMLEP2BEpyP/6gMK9utLsrnOnbTdwO37csu/AWYIP+8EebqjuVWJpNc GxE9eNgN1LMArKJe+RW8QZUU0e5ujJEV4B7jdb6J8pIXR98wiSCu9Yzrp/bVPkxxfUeO KvkL79XEKTGf4ANfFitsNX8Pu3fiPAg7q79DFx/vodNEx5Ohai9AY7JBbAzFsUl38l3/ mcFbO+QKpcZ35uE8AqSc7PKFArISlzmkudYkIAa/dUJSsLhPK/q9BM5VvqeKTJ6TZX3A tc/g== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bevxEQUK; spf=pass (google.com: domain of james.hilliard1@gmail.com designates 2607:f8b0:4864:20::d2c as permitted sender) smtp.mailfrom=james.hilliard1@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com. [2607:f8b0:4864:20::d2c]) by gmr-mx.google.com with ESMTPS id y2si1323509pjp.2.2021.11.21.11.57.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 Nov 2021 11:57:31 -0800 (PST) Received-SPF: pass (google.com: domain of james.hilliard1@gmail.com designates 2607:f8b0:4864:20::d2c as permitted sender) client-ip=2607:f8b0:4864:20::d2c; Received: by mail-io1-xd2c.google.com with SMTP id c3so20602068iob.6 for ; Sun, 21 Nov 2021 11:57:31 -0800 (PST) X-Received: by 2002:a05:6602:140d:: with SMTP id t13mr18064315iov.176.1637524651165; Sun, 21 Nov 2021 11:57:31 -0800 (PST) Received: from MacBook-Pro-2.localdomain (71-33-128-47.hlrn.qwest.net. [71.33.128.47]) by smtp.gmail.com with ESMTPSA id x18sm1333180iow.53.2021.11.21.11.57.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Nov 2021 11:57:30 -0800 (PST) From: James Hilliard To: swupdate@googlegroups.com Cc: James Hilliard Subject: [swupdate] [PATCH 1/1] archive_handler: fix archive_locale memory leak Date: Sun, 21 Nov 2021 12:57:28 -0700 Message-Id: <20211121195728.94858-1-james.hilliard1@gmail.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 X-Original-Sender: james.hilliard1@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bevxEQUK; spf=pass (google.com: domain of james.hilliard1@gmail.com designates 2607:f8b0:4864:20::d2c as permitted sender) smtp.mailfrom=james.hilliard1@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , We need to free the archive_locale after use. Fixes: ==628160== 240 bytes in 1 blocks are definitely lost in loss record 65 of 77 ==628160== at 0x483C855: malloc (vg_replace_malloc.c:380) ==628160== by 0x5091119: newlocale (newlocale.c:200) ==628160== by 0x133E48: extract (archive_handler.c:106) ==628160== by 0x4868608: start_thread (pthread_create.c:477) ==628160== by 0x517D292: clone (clone.S:95) ==628160== Signed-off-by: James Hilliard --- handlers/archive_handler.c | 1 + 1 file changed, 1 insertion(+) diff --git a/handlers/archive_handler.c b/handlers/archive_handler.c index ced7554..ef8989f 100644 --- a/handlers/archive_handler.c +++ b/handlers/archive_handler.c @@ -203,6 +203,7 @@ out: #ifdef CONFIG_LOCALE uselocale(old_locale); + freelocale(archive_locale); #endif data->exitval = exitval; pthread_exit(NULL);