mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 19:36:35 +08:00
There was a reference counting problem in the TPC logic of net_clone(). net_clone() which is the common logic underlying dup() and dup2() for sockets. When net_clone() calls net_start_monitor() and net_start_monitor() returns a failure (because the underlying TCP connection) then net_clone() must back out the reference count on the structure. Problem noted by Pascal Speck and this implementation of the solution is based on his suggestion.
This commit is contained in:
@@ -585,7 +585,7 @@ FAR struct mtd_dev_s *blockmtd_initialize(FAR const char *path, size_t offset,
|
||||
* Teardown a previously created blockmtd device.
|
||||
*
|
||||
* Input Parameters:
|
||||
* mtd - Pointer to the mtd.
|
||||
* dev - Pointer to the mtd driver instance.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
@@ -655,7 +655,7 @@ FAR struct mtd_dev_s *filemtd_initialize(FAR const char *path, size_t offset,
|
||||
* Teardown a previously created filemtd device.
|
||||
*
|
||||
* Input Parameters:
|
||||
* mtd - Pointer to the mtd.
|
||||
* dev - Pointer to the mtd driver instance.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user