summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_sglist.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/subr_sglist.c')
-rw-r--r--sys/kern/subr_sglist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/subr_sglist.c b/sys/kern/subr_sglist.c
index c66973a..df88a26 100644
--- a/sys/kern/subr_sglist.c
+++ b/sys/kern/subr_sglist.c
@@ -216,6 +216,9 @@ void
sglist_free(struct sglist *sg)
{
+ if (sg == NULL)
+ return;
+
if (refcount_release(&sg->sg_refs))
free(sg, M_SGLIST);
}
OpenPOWER on IntegriCloud