summaryrefslogtreecommitdiffstats
path: root/sys/geom/uncompress
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-04-27 14:59:31 +0000
committerpfg <pfg@FreeBSD.org>2015-04-27 14:59:31 +0000
commit386430302e2da36304ca96605ef68056caf98203 (patch)
treed64aafba92b43fe875996b06f1447b505af015ed /sys/geom/uncompress
parentbcef2e5533f44c10efe92eba05aef18e3881ebe1 (diff)
downloadFreeBSD-src-386430302e2da36304ca96605ef68056caf98203.zip
FreeBSD-src-386430302e2da36304ca96605ef68056caf98203.tar.gz
MFC r281769:
g_uncompress_taste: prevent a double free. Found by: Clang Static Analyzer
Diffstat (limited to 'sys/geom/uncompress')
-rw-r--r--sys/geom/uncompress/g_uncompress.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/geom/uncompress/g_uncompress.c b/sys/geom/uncompress/g_uncompress.c
index 5bc8d30..d819371 100644
--- a/sys/geom/uncompress/g_uncompress.c
+++ b/sys/geom/uncompress/g_uncompress.c
@@ -571,6 +571,7 @@ g_uncompress_taste(struct g_class *mp, struct g_provider *pp, int flags)
(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;
OpenPOWER on IntegriCloud