diff options
author | pjd <pjd@FreeBSD.org> | 2004-07-01 12:42:13 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2004-07-01 12:42:13 +0000 |
commit | 0d5a48eb8a104c215a5a748bd925f5bb00b8abef (patch) | |
tree | 3de2228b7a4df93492a9663afe31232eb70536d6 /sys/geom/geom_slice.c | |
parent | 39059e22bc1f00b30c3cb95ebb2f954c61021937 (diff) | |
download | FreeBSD-src-0d5a48eb8a104c215a5a748bd925f5bb00b8abef.zip FreeBSD-src-0d5a48eb8a104c215a5a748bd925f5bb00b8abef.tar.gz |
Free only if pointer isn't NULL.
Diffstat (limited to 'sys/geom/geom_slice.c')
-rw-r--r-- | sys/geom/geom_slice.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/geom/geom_slice.c b/sys/geom/geom_slice.c index 95312c0..736ab0c 100644 --- a/sys/geom/geom_slice.c +++ b/sys/geom/geom_slice.c @@ -79,7 +79,8 @@ g_slice_free(struct g_slicer *gsp) g_free(gsp->slices); if (gsp->hotspot != NULL) g_free(gsp->hotspot); - g_free(gsp->softc); + if (gsp->softc != NULL) + g_free(gsp->softc); g_free(gsp); } |