[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #19432] netbuf_ref doesn't check pbuf_alloc result
From: |
Kieran Mansley |
Subject: |
[lwip-devel] [bug #19432] netbuf_ref doesn't check pbuf_alloc result |
Date: |
Wed, 28 Mar 2007 13:11:24 +0000 |
User-agent: |
Opera/8.02 (X11; Linux i686; U; en) |
Follow-up Comment #5, bug #19432 (project lwip):
Ahh, OK. You're setting buf->ptr = NULL in case the alloc fails, to make
sure it is a sensible value. In that case it should read:
if (buf->p != NULL) {
pbuf_free(buf->p);
}
buf->p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_REF);
+ if (buf->p == NULL) {
+ buf->ptr = NULL;
+ return ERR_MEM;
+ }
As we only need to set this if there was an error. Do we also need to set
the length fields in buf (to zero) if there was a problem allocating buf->p?
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?19432>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #19432] netbuf_ref doesn't check pbuf_alloc result, Frédéric Bernon, 2007/03/28
- [lwip-devel] [bug #19432] netbuf_ref doesn't check pbuf_alloc result, Frédéric Bernon, 2007/03/28
- [lwip-devel] [bug #19432] netbuf_ref doesn't check pbuf_alloc result, Frédéric Bernon, 2007/03/28
- [lwip-devel] [bug #19432] netbuf_ref doesn't check pbuf_alloc result, Kieran Mansley, 2007/03/28
- [lwip-devel] [bug #19432] netbuf_ref doesn't check pbuf_alloc result, Frédéric Bernon, 2007/03/28
- [lwip-devel] [bug #19432] netbuf_ref doesn't check pbuf_alloc result,
Kieran Mansley <=
- [lwip-devel] [bug #19432] netbuf_ref doesn't check pbuf_alloc result, Frédéric Bernon, 2007/03/28
- [lwip-devel] [bug #19432] netbuf_ref doesn't check pbuf_alloc result, Kieran Mansley, 2007/03/28
- [lwip-devel] [bug #19432] netbuf_ref doesn't check pbuf_alloc result, Frédéric Bernon, 2007/03/28