Commit 5cd187fd authored by Jean Tourrilhes's avatar Jean Tourrilhes Committed by Linus Torvalds

[IrDA] irtty leaks

		<Stanford checker>
	o [CORRECT] fix two additional potential skb leaks in IrTTP.
parent e7ee0535
......@@ -1094,7 +1094,8 @@ int irttp_connect_request(struct tsap_cb *self, __u8 dtsap_sel,
* Check that the client has reserved enough space for
* headers
*/
ASSERT(skb_headroom(userdata) >= TTP_MAX_HEADER, return -1;);
ASSERT(skb_headroom(userdata) >= TTP_MAX_HEADER,
{ dev_kfree_skb(tx_skb); return -1; } );
}
/* Initialize connection parameters */
......@@ -1123,7 +1124,7 @@ int irttp_connect_request(struct tsap_cb *self, __u8 dtsap_sel,
/* SAR enabled? */
if (max_sdu_size > 0) {
ASSERT(skb_headroom(tx_skb) >= (TTP_MAX_HEADER + TTP_SAR_HEADER),
return -1;);
{ dev_kfree_skb(tx_skb); return -1; } );
/* Insert SAR parameters */
frame = skb_push(tx_skb, TTP_HEADER+TTP_SAR_HEADER);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment