net: Release net_buf in a case of error in IPv6 packet processing
Change-Id: Ic29762737d3d71e97a45cbe9bfccfb0dd1c1bb2f Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
49410ae20a
commit
210d10b036
1 changed files with 5 additions and 0 deletions
|
@ -2324,6 +2324,11 @@ uip_process(struct net_buf *buf, uint8_t flag)
|
|||
return;
|
||||
|
||||
drop:
|
||||
/* If there is an error, then just return the buffer to pool */
|
||||
if (uip_len(buf) == 0) {
|
||||
net_buf_put(buf);
|
||||
}
|
||||
|
||||
uip_len(buf) = 0;
|
||||
uip_ext_len(buf) = 0;
|
||||
uip_ext_bitmap(buf) = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue