summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-04-20 16:31:27 +0000
committerpfg <pfg@FreeBSD.org>2015-04-20 16:31:27 +0000
commita9137e11b6252da2f9901ebd51b7a3f8e7bbc515 (patch)
tree0fc9d543051d6f46c938fe73fc4434cbf839af32 /sys/geom
parent2906a9e028e3f910d224439ec7b226b0afbc2ad5 (diff)
downloadFreeBSD-src-a9137e11b6252da2f9901ebd51b7a3f8e7bbc515.zip
FreeBSD-src-a9137e11b6252da2f9901ebd51b7a3f8e7bbc515.tar.gz
g_uncompress_taste: prevent a double free.
Found by: Clang Static Analyzer MFC after: 1 week
Diffstat (limited to 'sys/geom')
-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