net: qrtr: potential use after free in qrtr_sendmsg()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 20 Apr 2017 10:21:30 +0000 (13:21 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Apr 2017 19:19:27 +0000 (15:19 -0400)
commit6f60f438108c66988c944894e5f673ab5d04fbc1
treed1e7d20c0fb58fd57e45270fa68917091c1e942f
parent89087c456fb5cb5e534edf1c30568a8baae4c906
net: qrtr: potential use after free in qrtr_sendmsg()

If skb_pad() fails then it frees the skb so we should check for errors.

Fixes: bdabad3e363d ("net: Add Qualcomm IPC router")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/qrtr/qrtr.c