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

Submitter:  Frédéric Bernon <fbernon>
Submitted:  Mon 02 Jul 2007 02:53:36 PM UTC
   
 
Category:  None Severity:  2 - Minor
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  fbernon
Open/Closed:  Closed Planned 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>
Group Member
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>
Group Member
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>
Group 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>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-07-13 fbernon StatusNone Fixed
        Open/ClosedOpen Closed
    2007-07-13 kieranm Planned Release 1.3.0

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code