Date: Mon, 27 Apr 2015 15:00:17 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r282095 - stable/9/sys/geom/uncompress Message-ID: <201504271500.t3RF0HBg008971@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Mon Apr 27 15:00:16 2015 New Revision: 282095 URL: https://svnweb.freebsd.org/changeset/base/282095 Log: MFC r281769: g_uncompress_taste: prevent a double free. Found by: Clang Static Analyzer Modified: stable/9/sys/geom/uncompress/g_uncompress.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/uncompress/g_uncompress.c ============================================================================== --- stable/9/sys/geom/uncompress/g_uncompress.c Mon Apr 27 14:59:31 2015 (r282094) +++ stable/9/sys/geom/uncompress/g_uncompress.c Mon Apr 27 15:00:16 2015 (r282095) @@ -565,6 +565,7 @@ g_uncompress_taste(struct g_class *mp, s sc->offsets[i] = be64toh(((uint64_t *) (buf+sizeof(struct cloop_header)))[i]); } + buf = NULL; DPRINTF(("%s: done reading offsets\n", gp->name)); mtx_init(&sc->last_mtx, "geom_uncompress cache", NULL, MTX_DEF); sc->last_blk = -1;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504271500.t3RF0HBg008971>