Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5023583yba; Wed, 8 May 2019 06:47:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPE0qGpNjtmzXjPgRCCDqySzkS8GSVJ9iH8rvn3kmG0+etBJAtrvwC+9OS2Xu/065Avl5G X-Received: by 2002:a62:2e46:: with SMTP id u67mr8544961pfu.206.1557323271523; Wed, 08 May 2019 06:47:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557323271; cv=none; d=google.com; s=arc-20160816; b=pFsvFblQqEIYXafnxwJGrQvfo/SVA4S1wkRyVIhE5wTjOkJGKFVjtZvRsFUEHbnybB pFXM723VXzDoGbqiKZAnWTkOVrqLNsrpVpwKOeoym5f7Yb96+dr91QE5JFdHaiI8Bgao Nm6EeTgym8l6tr/xXL+3xYw7pYcUi5p98K4zFLrZWQb504HM9gt5VB7jSILd8nN1vR/t 6WDHpk4k63/nf9KWKPkDZN64XHilTU+IUr9JAr/oXwCGcxLB7jx9PtuoxtXkilYmf9Aa H9+VVbUNPWbENC4dUEpIrlqfd0fs0D0WQwBUN44u8zeYlOGD4xnkCMQjpbhpLKjLRToi /TvQ== 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=sie7RhOJC8sn9UeKKoEjIM1qIx7FzqkHrqYVyHGKWx4=; b=Odc3b0gMWWaHPJQz7YSijPhCM6HQZWLb4oL0bxRGx0Fr1zL+IcnJXNWou4QGTrJKZ/ uLkv3qYU68YQEGH7BmD8sDOp+uEvpS1rlpGfK2XTAydcC+9ayk5dRQFQVJURnMP/86qg cSM7e/riCQYj3AgKJY1UfPvQPiGXOZEj7W+cnrIbNVrBg118Rr8j+O+aqImVilRqLlnL MicSDpRX7g0GUscaA8RfQLDCaXtkXbHaF4ud5N+wa9EG/y/OgIAqlJE1ne0Df/xsfIvp dDwaS57AX+7D4/tntoEzqiAAyF3INvGeFboaUcfq6qgVtF58OKnGCOzcPvviH7aIByZ+ mF4Q== 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 k14si23038658pgh.437.2019.05.08.06.47.37; Wed, 08 May 2019 06:47:51 -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 S1727271AbfEHNfr (ORCPT + 99 others); Wed, 8 May 2019 09:35:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35119 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727370AbfEHNfr (ORCPT ); Wed, 8 May 2019 09:35:47 -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 5B6E33087951 for ; Wed, 8 May 2019 13:35:47 +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 14F021724D for ; Wed, 8 May 2019 13:35:47 +0000 (UTC) From: Steve Dickson To: Linux NFS Mailing list Subject: [PATCH 14/19] Removed a resource leak from mount/configfile.c Date: Wed, 8 May 2019 09:35:31 -0400 Message-Id: <20190508133536.6077-15-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.45]); Wed, 08 May 2019 13:35:47 +0000 (UTC) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org mount/configfile.c:410: leaked_storage: Variable "config_opts" going out of scope leaks the storage it points to. Signed-off-by: Steve Dickson --- utils/mount/configfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/mount/configfile.c b/utils/mount/configfile.c index b48b25e..93fe500 100644 --- a/utils/mount/configfile.c +++ b/utils/mount/configfile.c @@ -404,7 +404,7 @@ char *conf_get_mntopts(char *spec, char *mount_point, /* list_size + optlen + ',' + '\0' */ config_opts = calloc(1, (list_size+optlen+2)); - if (server == NULL) { + if (config_opts == NULL) { xlog_warn("conf_get_mountops: Unable calloc memory for config_opts"); free_all(); return mount_opts; -- 2.20.1