Skip to content

LWIP::socket_close() can attempt to free a null pbuf structure #12184

@nat45928

Description

@nat45928

Description of defect

When closing a TCP socket with LwIP debugging enabled I can see a debug statement pbuf_free(p == NULL) was called. It appears change 3b178a0 modified a statement from netbuf_delete() to pbuf_free(). The netbuf_delete() function includes a null check which is not included in pbuf_free().

Target(s) affected by this defect ?

NUCLEO_F767ZI

Toolchain(s) (name and version) displaying this defect ?

GCC_ARM 9-2019q4

What version of Mbed-os are you using (tag or sha) ?

de798c4

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

mbed-cli 1.10.2

How is this defect reproduced ?

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions