buglwIP - A Lightweight TCP/IP stack - Bugs: bug #20318, api_msg "recv" callbacks...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #20318: api_msg "recv" callbacks don't call pbuf_free in all error cases

Submitted by:  Frédéric Bernon <fbernon>
Submitted on:  Mon 02 Jul 2007 02:53:36 PM UTC  
 
Category: NoneSeverity: 2 - Minor
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Frédéric Bernon <fbernon>
Open/Closed: ClosedPlanned Release: None
lwIP version: None

Fri 13 Jul 2007 02:28:57 PM UTC, comment #3:

Ok, check in like Simon suggest...

Frédéric Bernon <fbernon>
Project MemberIn charge of this item.
Mon 02 Jul 2007 03:38:46 PM UTC, comment #2:

Ok, good for me. I will fix this once I will be sure than other users have see that (since they don't receive Savannah emails...).

Frédéric Bernon <fbernon>
Project MemberIn charge of this item.
Mon 02 Jul 2007 03:28:37 PM UTC, comment #1:

Seems right. I'd make it

if ((conn == NULL) || (conn->recvmbox == SYS_MBOX_NULL)) {
pbuf_free(p);
return;
}

Simon Goldschmidt <goldsimon>
Project Administrator
Mon 02 Jul 2007 02:53:36 PM UTC, original submission:

recv_udp & recv_tcp check is the conn->recvmbox is valid before post the pbuf/netbuf. I think they should call pbuf_free is the mailbox is invalid, and this is not the case. Even if this case should not appear, we should process it (or if we think it never appear, we should remove the test, and replace it by an assert).

I think there is no problem with recv_raw, since this callback should never "eat" the packets...

Can I have your comments about that?

Frédéric Bernon <fbernon>
Project MemberIn charge of this item.

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by kieranm (Updated the item)
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by fbernon (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 13 Jul 2007 02:28:57 PM UTCfbernonStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Fri 13 Jul 2007 11:50:26 AM UTCkieranmPlanned Release=>1.3.0

    Back to the top


    Powered by Savane 3.1-cleanup1