diff options
author | Lukas Ertl <le@FreeBSD.org> | 2004-07-25 09:41:31 +0000 |
---|---|---|
committer | Lukas Ertl <le@FreeBSD.org> | 2004-07-25 09:41:31 +0000 |
commit | 5289667c161d4d10576ecd694233f8e5509109cc (patch) | |
tree | 82a60c5137499539e1ba79e05c6444b34f845cf7 /sys/geom/geom_slice.c | |
parent | 1292e8a3b6a76a1a7196fb9f152c9f65ffdc96e3 (diff) | |
download | src-5289667c161d4d10576ecd694233f8e5509109cc.tar.gz src-5289667c161d4d10576ecd694233f8e5509109cc.zip |
Check for a NULL pointer before dereferencing it.
Notes
Notes:
svn path=/head/; revision=132631
Diffstat (limited to 'sys/geom/geom_slice.c')
-rw-r--r-- | sys/geom/geom_slice.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/geom/geom_slice.c b/sys/geom/geom_slice.c index 549005b6dac8..74926b5e10b3 100644 --- a/sys/geom/geom_slice.c +++ b/sys/geom/geom_slice.c @@ -76,6 +76,8 @@ static void g_slice_free(struct g_slicer *gsp) { + if (gsp == NULL) /* XXX: phk thinks about this */ + return; g_free(gsp->slices); if (gsp->hotspot != NULL) g_free(gsp->hotspot); |