Date: Mon, 20 Apr 2015 16:31:27 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281769 - head/sys/geom/uncompress Message-ID: <201504201631.t3KGVRwo031112@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Mon Apr 20 16:31:27 2015 New Revision: 281769 URL: https://svnweb.freebsd.org/changeset/base/281769 Log: g_uncompress_taste: prevent a double free. Found by: Clang Static Analyzer MFC after: 1 week Modified: head/sys/geom/uncompress/g_uncompress.c Modified: head/sys/geom/uncompress/g_uncompress.c ============================================================================== --- head/sys/geom/uncompress/g_uncompress.c Mon Apr 20 16:23:59 2015 (r281768) +++ head/sys/geom/uncompress/g_uncompress.c Mon Apr 20 16:31:27 2015 (r281769) @@ -571,6 +571,7 @@ g_uncompress_taste(struct g_class *mp, s (buf+sizeof(struct cloop_header)))[i]); } free(buf, M_GEOM); + 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?201504201631.t3KGVRwo031112>