Merge pull request #14740 from chrisswinchatt-arm/fix-netsocket-dynalloc
Fix 'netsocket: several dynamic allocation results not checked' (#14210) add_event_listener in NetworkInterface now returns an error if the method fails. Previous attempts to add the event listener would attempt to use an unchecked standard dynamically allocated ns_list_* item. In other cases, the dynamically allocated items will now be checked, and if unsuccessful, will return after cleaning up any outstanding issues. TCPSocket::accept will now check that its own internally allocated new TCPSocket call will succeed, and if not, will clean up the stack resources. This should help when memory is low but an incoming connection requests a connection when the TCPSocket is listening. |
---|
connectivity/netsocket/include/netsocket/NetworkInterface.h |
---|
connectivity/netsocket/mbed_lib.json |
---|
connectivity/netsocket/source/NetworkInterface.cpp |
---|
connectivity/netsocket/source/TCPSocket.cpp |
---|
connectivity/netsocket/source/TLSSocketWrapper.cpp |
---|
connectivity/netsocket/source/nsapi_dns.cpp |
---|
tools/test/travis-ci/doxy-spellchecker/ignore.en.pws |
---|