From owner-svn-src-all@FreeBSD.ORG Thu May 1 15:23:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5B98F07; Thu, 1 May 2014 15:23:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92F84179E; Thu, 1 May 2014 15:23:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s41FNK0m008083; Thu, 1 May 2014 15:23:20 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s41FNKh1008082; Thu, 1 May 2014 15:23:20 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201405011523.s41FNKh1008082@svn.freebsd.org> From: Luiz Otavio O Souza Date: Thu, 1 May 2014 15:23:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265197 - head/sys/geom/uzip X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2014 15:23:20 -0000 Author: loos Date: Thu May 1 15:23:20 2014 New Revision: 265197 URL: http://svnweb.freebsd.org/changeset/base/265197 Log: Fix a leak in g_uzip_taste(). After retrieve all the block offsets from the uzip image, free the last data read. Modified: head/sys/geom/uzip/g_uzip.c Modified: head/sys/geom/uzip/g_uzip.c ============================================================================== --- head/sys/geom/uzip/g_uzip.c Thu May 1 15:04:32 2014 (r265196) +++ head/sys/geom/uzip/g_uzip.c Thu May 1 15:23:20 2014 (r265197) @@ -479,6 +479,7 @@ g_uzip_taste(struct g_class *mp, struct } offsets_read += nread; } + free(buf, M_GEOM); DPRINTF(("%s: done reading offsets\n", gp->name)); mtx_init(&sc->last_mtx, "geom_uzip cache", NULL, MTX_DEF); sc->last_blk = -1;