diff options
author | pfg <pfg@FreeBSD.org> | 2015-04-20 16:31:27 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2015-04-20 16:31:27 +0000 |
commit | a9137e11b6252da2f9901ebd51b7a3f8e7bbc515 (patch) | |
tree | 0fc9d543051d6f46c938fe73fc4434cbf839af32 /sys/geom | |
parent | 2906a9e028e3f910d224439ec7b226b0afbc2ad5 (diff) | |
download | FreeBSD-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.c | 1 |
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; |