diff --git a/sys/netgraph/ng_ppp.c b/sys/netgraph/ng_ppp.c index fb48eebe33c4..7016a73c09e7 100644 --- a/sys/netgraph/ng_ppp.c +++ b/sys/netgraph/ng_ppp.c @@ -1319,18 +1319,17 @@ ng_ppp_frag_process(node_p node) /* Deliver any deliverable packets */ while (ng_ppp_check_packet(node)) { ng_ppp_get_packet(node, &m); - if ((item = ng_package_data(m, NG_NOFLAGS)) == NULL) - return (ENOMEM); - ng_ppp_input(node, 0, NG_PPP_BUNDLE_LINKNUM, item); + if ((item = ng_package_data(m, NG_NOFLAGS)) != NULL) + ng_ppp_input(node, 0, NG_PPP_BUNDLE_LINKNUM, item); } /* Delete dead fragments and try again */ if (ng_ppp_frag_trim(node)) { while (ng_ppp_check_packet(node)) { ng_ppp_get_packet(node, &m); - if ((item = ng_package_data(m, NG_NOFLAGS)) == NULL) - return (ENOMEM); - ng_ppp_input(node, 0, NG_PPP_BUNDLE_LINKNUM, item); + if ((item = ng_package_data(m, NG_NOFLAGS)) != NULL) + ng_ppp_input(node, 0, NG_PPP_BUNDLE_LINKNUM, + item); } } @@ -1600,13 +1599,14 @@ deliver: } /* Send fragment */ - if ((item = ng_package_data(m2, NG_NOFLAGS)) == NULL) - return (ENOMEM); - error = ng_ppp_output(node, 0, PROT_MP, linkNum, item); - if (error != 0) { - if (!lastFragment) - NG_FREE_M(m); - return (error); + if ((item = ng_package_data(m2, NG_NOFLAGS)) != NULL) { + error = ng_ppp_output(node, 0, PROT_MP, + linkNum, item); + if (error != 0) { + if (!lastFragment) + NG_FREE_M(m); + return (error); + } } } }