summaryrefslogtreecommitdiffstats
path: root/sys/geom/uzip
diff options
context:
space:
mode:
authorloos <loos@FreeBSD.org>2014-05-01 15:23:20 +0000
committerloos <loos@FreeBSD.org>2014-05-01 15:23:20 +0000
commita8fbe04bdaa5da406a8833159f6c8cde74e5aac2 (patch)
treeb4da73d6caf5c94a0d569911841a49ec90ae476a /sys/geom/uzip
parent53cfe851be14d2b2171f8cdca79b68d628fecd00 (diff)
downloadFreeBSD-src-a8fbe04bdaa5da406a8833159f6c8cde74e5aac2.zip
FreeBSD-src-a8fbe04bdaa5da406a8833159f6c8cde74e5aac2.tar.gz
Fix a leak in g_uzip_taste(). After retrieve all the block offsets from
the uzip image, free the last data read.
Diffstat (limited to 'sys/geom/uzip')
-rw-r--r--sys/geom/uzip/g_uzip.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/geom/uzip/g_uzip.c b/sys/geom/uzip/g_uzip.c
index ab9857b..1dacfa0 100644
--- a/sys/geom/uzip/g_uzip.c
+++ b/sys/geom/uzip/g_uzip.c
@@ -479,6 +479,7 @@ g_uzip_taste(struct g_class *mp, struct g_provider *pp, int flags)
}
offsets_read += nread;
}
+ free(buf, M_GEOM);
DPRINTF(("%s: done reading offsets\n", gp->name));
mtx_init(&sc->last_mtx, "geom_uzip cache", NULL, MTX_DEF);
sc->last_blk = -1;
OpenPOWER on IntegriCloud