summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/io/mac/mac_util.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/usr/src/uts/common/io/mac/mac_util.c b/usr/src/uts/common/io/mac/mac_util.c
index 111b323f81..334d1d034b 100644
--- a/usr/src/uts/common/io/mac/mac_util.c
+++ b/usr/src/uts/common/io/mac/mac_util.c
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2018 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
*/
/*
@@ -1239,9 +1239,19 @@ mac_hw_emul(mblk_t **mp_chain, mblk_t **otail, uint_t *ocount, mac_emul_t emul)
*/
mac_sw_lso(mp, emul, &tmphead, &tmptail,
&tmpcount);
+ if (tmphead == NULL) {
+ /* mac_sw_lso() freed the mp. */
+ mp = next;
+ continue;
+ }
count += tmpcount;
} else if ((flags & HCK_NEEDED) && (emul & MAC_HWCKSUM_EMULS)) {
tmp = mac_sw_cksum(mp, emul);
+ if (tmp == NULL) {
+ /* mac_sw_cksum() freed the mp. */
+ mp = next;
+ continue;
+ }
tmphead = tmp;
tmptail = tmp;
count++;