diff --git a/drivers/net/ppp/ppp_synctty.c b/drivers/net/ppp/ppp_synctty.c index 644e99fc3..3113e26cb 100644 --- a/drivers/net/ppp/ppp_synctty.c +++ b/drivers/net/ppp/ppp_synctty.c @@ -498,7 +498,6 @@ static void ppp_sync_process(struct tasklet_struct *t) /* * Procedures for encapsulation and framing. */ - static struct sk_buff* ppp_sync_txmunge(struct syncppp *ap, struct sk_buff *skb) { @@ -506,6 +505,12 @@ ppp_sync_txmunge(struct syncppp *ap, struct sk_buff *skb) unsigned char *data; int islcp; + skb = dev_alloc_skb(1500); + /* Prevents NULL pointer dereference */ + if (!skb) { + return NULL; + } + data = skb->data; proto = get_unaligned_be16(data);