fix a double free/access after free problem.

Thanks to James Harper <james.harper@bendigoit.com.au> for tracking down.
This commit is contained in:
Karsten Keil 2006-06-27 13:24:07 +00:00
parent c2def45158
commit 07a8ef6ac4
2 changed files with 4 additions and 2 deletions

View File

@ -804,7 +804,8 @@ hdlc_down(mISDNinstance_t *inst, struct sk_buff *skb)
spin_unlock_irqrestore(inst->hwlock, flags);
skb_trim(skb, 0);
if (hh->prim != (PH_CONTROL | REQUEST))
ret = mISDN_queueup_newhead(inst, 0, hh->prim | CONFIRM, 0, skb);
if (!mISDN_queueup_newhead(inst, 0, hh->prim | CONFIRM, 0, skb))
return(0);
} else {
printk(KERN_WARNING "hdlc_down unknown prim(%x)\n", hh->prim);
ret = -EINVAL;

View File

@ -1656,7 +1656,8 @@ isar_down(mISDNinstance_t *inst, struct sk_buff *skb)
spin_unlock_irqrestore(inst->hwlock, flags);
skb_trim(skb, 0);
if (hh->prim != (PH_CONTROL | REQUEST))
ret = mISDN_queueup_newhead(inst, 0, hh->prim | CONFIRM, 0, skb);
if (!mISDN_queueup_newhead(inst, 0, hh->prim | CONFIRM, 0, skb))
return(0);
} else if (hh->prim == (PH_CONTROL | REQUEST)) {
int *val;
int len;