Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp611737pxt; Fri, 6 Aug 2021 09:24:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrppnQGPFEHJCwkqYPozPgVGUBUTQsKM00XsGwXE5ih8Yv6u1xgBuwztPk1HmK+bK7AVIB X-Received: by 2002:a6b:7e01:: with SMTP id i1mr178328iom.13.1628267061796; Fri, 06 Aug 2021 09:24:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628267061; cv=none; d=google.com; s=arc-20160816; b=MXbTfRMi++Mv67LVQWPD1VjTWFKXddh7IBjqmRmq1JRzt/1plpeqqGdODl2CEmy4Jb 70ziDmR1y8s8A3kSxbYngSMbzOf/8g/xdGmFlwjeAjRoYhY1LpvmAeNaUZrMIQxclvKR FmEd6ADkTJYoY9N4Y4Cp5mZOzFYpQTRlGsYdaJ0BVp+tkLv9qTDR1+VdLhEw4WbZXokk eevSl9eQCha7qisU6drlqMGUP1B+k6gEy31SZo4XVs9o1gqT2wwKRCrzTqpVjEpP3BQO NqhlLmSt3UzlBzIeT2IiDQwglm33WcKwzEGOtjhfcPQlzSwQK4oxtblE89HisFteHP3g wzfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=aESQJrjRjEGA2KBzRJNS+CI346f4W84tNzuVuGynsGk=; b=Vw+TEb9qnynXozei3U2ichXdPDBvFRyBtwV59Wh6O72nvIEhy/4X8lFk93CUv8e2b/ jbH4lzI1NXjsu31zBqLU3nrRxdzj1cT/vlF8UQ4CuBMRB1GCJAy9Ye+iQe8QUysO8JwK g9/2yAvmwVUT8/lEM+YBiDSweypDc+kPUBoZWXE99YsoPwF59chWdd3DNR6b8zoMIQC1 UX61f1DopRFG9M40OSSRA0pQTYR1hJbxiVFoYOngLC4giGOW9KuWDzzwJqH2f2JCp6T3 yzGG5eLY0rlX5y9E0SMovDc+dMgz0Crph/ThBLmWuKiQ9nrjOjk2dZEWv49iS5nvTEpv PGRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ffefhdAN; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x4si8631457ilh.33.2021.08.06.09.24.08; Fri, 06 Aug 2021 09:24:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ffefhdAN; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240311AbhHFMeC (ORCPT + 99 others); Fri, 6 Aug 2021 08:34:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:57681 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238794AbhHFMeC (ORCPT ); Fri, 6 Aug 2021 08:34:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628253226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aESQJrjRjEGA2KBzRJNS+CI346f4W84tNzuVuGynsGk=; b=ffefhdAN3yD1EfZFZ63hTdH7qzl3nwYwiq+zfXO4aomh7iLOtDiwglKI6PH1DHBnULXJte rPvxNoD4RjoFtD3ysdk80K/fa1DkIsrP7U/5G7Wvr0xyTzwE5cMkvulrUYVaeRIxKDsMuw nWHvq/ipkpqbhrY7FFynqJkTAdri7wY= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-428-26wt8Yr7MrOYfzg-49YItw-1; Fri, 06 Aug 2021 08:33:44 -0400 X-MC-Unique: 26wt8Yr7MrOYfzg-49YItw-1 Received: by mail-wr1-f71.google.com with SMTP id f6-20020adfe9060000b0290153abe88c2dso3103058wrm.20 for ; Fri, 06 Aug 2021 05:33:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=aESQJrjRjEGA2KBzRJNS+CI346f4W84tNzuVuGynsGk=; b=abF3nJBdaPn76FM+krBoOTPyOwZR7cdsmHBp/7xPrgPevPx3r5BzcAeXaWbEvDDnPe lavT9QpMhu+bWmPpEO/rYUI3ZTL4T8Gvqo8ecIEbGN02+2EwYr5rAQZvkxYhnQmq7Wuq 8L5Q7wAJ3sBkl3IKAgi1s9dYGnSoBbmfGQ3wUNXdkGsMNnEE2FGPTM4OKQsBTnA0s4sA oo5RLl2i8Xt0XMMCOenoNcwCAWMml7RUQSlS8g/kUzvujHVsGL6PES6HJr+v+oNbmqSU wbaF0CPiqjDLgpILV2wiHk5e2MboVu1t1CbyCTw+F5+LhgyohBRQfNNoRX+ElsqROZp4 4hUQ== X-Gm-Message-State: AOAM530n2FBjPi+S3NKL8aWURdBCsrbDkS5oaZYeu/nY7ws4OIy0Rlqh Lukkpm90c6Lzrria/WP61x6a473LuiNwAp0BSsN9ejsJ8yPnIBOroioc/Cwqwu/XOy9Zg3SBS39 JQE125bqLTM/i2ygQdDoRN4wpi7GR/7LvTiGn0+E0fsto/tjkhoezDgHB8ZaAEbMNMjlE5sJoI0 Y= X-Received: by 2002:adf:ec50:: with SMTP id w16mr10704074wrn.56.1628253223618; Fri, 06 Aug 2021 05:33:43 -0700 (PDT) X-Received: by 2002:adf:ec50:: with SMTP id w16mr10704063wrn.56.1628253223492; Fri, 06 Aug 2021 05:33:43 -0700 (PDT) Received: from ajmitchell.remote.csb ([95.145.245.173]) by smtp.gmail.com with ESMTPSA id y4sm8412147wmi.22.2021.08.06.05.33.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Aug 2021 05:33:43 -0700 (PDT) Message-ID: Subject: [PATCH 4/4] nfs-utils: Fix mem leak in mountd From: Alice Mitchell To: linux-nfs@vger.kernel.org Cc: Steve Dickson Date: Fri, 06 Aug 2021 13:33:42 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-16.el8) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Signed-off-by: Alice Mitchell --- utils/mountd/rmtab.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/mountd/rmtab.c b/utils/mountd/rmtab.c index 2da9761..752fdb6 100644 --- a/utils/mountd/rmtab.c +++ b/utils/mountd/rmtab.c @@ -233,6 +233,9 @@ mountlist_list(void) m->ml_directory = strdup(rep->r_path); if (m->ml_hostname == NULL || m->ml_directory == NULL) { + free(m->ml_hostname); + free(m->ml_directory); + free(m); mountlist_freeall(mlist); mlist = NULL; xlog(L_ERROR, "%s: memory allocation failed", -- 2.27.0