diff options
author | le <le@FreeBSD.org> | 2004-07-25 09:41:31 +0000 |
---|---|---|
committer | le <le@FreeBSD.org> | 2004-07-25 09:41:31 +0000 |
commit | c5dbc6f1ad1c286838116af43e5f4dfb64d18359 (patch) | |
tree | 82a60c5137499539e1ba79e05c6444b34f845cf7 /sys/geom/geom_slice.c | |
parent | bcc926918c06b1a6eae84aad652278c7bcc77262 (diff) | |
download | FreeBSD-src-c5dbc6f1ad1c286838116af43e5f4dfb64d18359.zip FreeBSD-src-c5dbc6f1ad1c286838116af43e5f4dfb64d18359.tar.gz |
Check for a NULL pointer before dereferencing it.
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 549005b..74926b5 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); |