diff options
-rw-r--r-- | sys/dev/xen/netfront/netfront.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c index a70c47c..f6b6641 100644 --- a/sys/dev/xen/netfront/netfront.c +++ b/sys/dev/xen/netfront/netfront.c @@ -1297,11 +1297,12 @@ xennet_get_responses(struct netfront_info *np, gnttab_release_grant_reference(&np->gref_rx_head, ref); next: - if (m != NULL) { - m->m_len = rx->status; - m->m_data += rx->offset; - m0->m_pkthdr.len += rx->status; - } + if (m == NULL) + break; + + m->m_len = rx->status; + m->m_data += rx->offset; + m0->m_pkthdr.len += rx->status; if (!(rx->flags & NETRXF_more_data)) break; |