diff --git a/sys/netatalk/aarp.c b/sys/netatalk/aarp.c index b4370973e85..abe66571d3a 100644 --- a/sys/netatalk/aarp.c +++ b/sys/netatalk/aarp.c @@ -167,6 +167,9 @@ aarpwhohas( struct arpcom *ac, struct sockaddr_at *sat ) sizeof( eh->ether_dhost )); eh->ether_type = htons(sizeof(struct llc) + sizeof(struct ether_aarp)); M_PREPEND( m, sizeof( struct llc ), M_TRYWAIT ); + if ( m == NULL ) { + return; + } llc = mtod( m, struct llc *); llc->llc_dsap = llc->llc_ssap = LLC_SNAP_LSAP; llc->llc_control = LLC_UI; @@ -581,6 +584,9 @@ aarpprobe( void *arg ) eh->ether_type = htons( sizeof( struct llc ) + sizeof( struct ether_aarp )); M_PREPEND( m, sizeof( struct llc ), M_TRYWAIT ); + if ( m == NULL ) { + return; + } llc = mtod( m, struct llc *); llc->llc_dsap = llc->llc_ssap = LLC_SNAP_LSAP; llc->llc_control = LLC_UI; diff --git a/sys/netatalk/ddp_output.c b/sys/netatalk/ddp_output.c index f15914be2bb..5f7874da38a 100644 --- a/sys/netatalk/ddp_output.c +++ b/sys/netatalk/ddp_output.c @@ -56,6 +56,8 @@ ddp_output( struct mbuf *m, struct socket *so) #endif M_PREPEND( m, sizeof( struct ddpehdr ), M_TRYWAIT ); + if ( m == NULL ) + return( ENOBUFS ); deh = mtod( m, struct ddpehdr *); deh->deh_pad = 0;