1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

g_uncompress_taste: prevent a double free.

Found by:	Clang Static Analyzer
MFC after:	1 week
This commit is contained in:
Pedro F. Giffuni 2015-04-20 16:31:27 +00:00
parent 587257fb9f
commit 4a5e6b854d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=281769

View File

@ -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;