Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5023866yba; Wed, 8 May 2019 06:48:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxa6TmpRAq4oyIARHEt5s4MJAoTTKMT+xjGnCumQWFvHnAq5V9hYQhw5CoJ/tUoG9vKHNjG X-Received: by 2002:a62:7a8f:: with SMTP id v137mr34602394pfc.243.1557323289661; Wed, 08 May 2019 06:48:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557323289; cv=none; d=google.com; s=arc-20160816; b=SNrr02/ZbPf6tI21kuzdn3TP7ecxtQG07fA8JUjhFp/kuPRHa2/BbZirnJyu0mvhi2 IsHS2stRbRngF77SP5QEhsExGjHc3GA82CgUX84SKFbJQtFItj3ryfth7pFE3v0qopBs pkwrrUlkxzh2toti+KVKvMdCmpeOZi0dMaNXgPpa4mpECL7/gZdzEkruZ85BIXX2+8/c iX5U5M6UX7j74GnPCddpDzkH5mtxkb9TYDa9/DLX9kIOYtTVruEeVVylLtNXrLo0s1EJ T/HKdGH1QF1r8JfAJSdv4P38vhmV2bFdj5Amt3LNeFYbb3eerL3IByClwOIIsBGkEIZL ndwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from; bh=fs5LN5Xwf1yPzcJsw+XhihQD2m9y4VLoVkkFX1LAb+0=; b=pH0a3OQc5OiS1GHerwJi/ScN1j3rkm3XNuOw5ApJ02oDjeuJyW51lsfBR8QLQcT2Dv dPUw5ju/ZbNaC0ag6blGsopRC1yziyEJ+2zLyp3AF8YpcElA1FF0BP+fejI1Nr9Oxdvt gkwUlyKy4gTQd9yhPwvK7iLe+pUr+uyxtDkLHL7Y1eDErn2nrTfhqUOJ4Y7Qb4qVAzH6 mVGz66GrUrv3yadG5MFrJ3Q0w2PIE34xV+OXh/JM1D7gkn71S6gUNQtoDQUwG0c5kt2K J+EE2v1JpHcVe6PLgU7dkg3dzZlMDHcvgag4kt61fICBhinoArRaR2BgeM2aCUs9hnl2 yxmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f62si23745040plb.339.2019.05.08.06.47.56; Wed, 08 May 2019 06:48:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727477AbfEHNfv (ORCPT + 99 others); Wed, 8 May 2019 09:35:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9289 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727414AbfEHNfu (ORCPT ); Wed, 8 May 2019 09:35:50 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 800AD2D7EF for ; Wed, 8 May 2019 13:35:50 +0000 (UTC) Received: from madhat.boston.devel.redhat.com (ovpn-116-59.phx2.redhat.com [10.3.116.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 37C0F61D02 for ; Wed, 8 May 2019 13:35:50 +0000 (UTC) From: Steve Dickson To: Linux NFS Mailing list Subject: [PATCH 19/19] Removed a resource leak from nfsdcltrack/sqlite.c Date: Wed, 8 May 2019 09:35:36 -0400 Message-Id: <20190508133536.6077-20-steved@redhat.com> In-Reply-To: <20190508133536.6077-1-steved@redhat.com> References: <20190508133536.6077-1-steved@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 08 May 2019 13:35:50 +0000 (UTC) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org nfsdcltrack/sqlite.c:218: leaked_storage: Variable "err" going out of scope leaks the storage it points to. Signed-off-by: Steve Dickson --- utils/nfsdcltrack/sqlite.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/nfsdcltrack/sqlite.c b/utils/nfsdcltrack/sqlite.c index c59f777..2801201 100644 --- a/utils/nfsdcltrack/sqlite.c +++ b/utils/nfsdcltrack/sqlite.c @@ -215,6 +215,8 @@ sqlite_maindb_init_v2(void) &err); if (ret != SQLITE_OK) { xlog(L_ERROR, "Unable to begin transaction: %s", err); + if (err) + sqlite3_free(err); return ret; } -- 2.20.1