mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:43:28 +08:00
net/inet and net/tcp: Fix tcp close flow; free the connection after all tcp close process finished.
This commit is contained in:
@@ -81,7 +81,7 @@ FAR char *getenv(FAR const char *name)
|
||||
|
||||
/* Verify that a string was passed */
|
||||
|
||||
if (!name)
|
||||
if (name == NULL)
|
||||
{
|
||||
ret = EINVAL;
|
||||
goto errout;
|
||||
@@ -95,7 +95,7 @@ FAR char *getenv(FAR const char *name)
|
||||
|
||||
/* Check if the variable exists */
|
||||
|
||||
if (!group || (pvar = env_findvar(group, name)) == NULL)
|
||||
if (group == NULL || (pvar = env_findvar(group, name)) == NULL)
|
||||
{
|
||||
ret = ENOENT;
|
||||
goto errout_with_lock;
|
||||
@@ -104,7 +104,7 @@ FAR char *getenv(FAR const char *name)
|
||||
/* It does! Get the value sub-string from the name=value string */
|
||||
|
||||
pvalue = strchr(pvar, '=');
|
||||
if (!pvalue)
|
||||
if (pvalue == NULL)
|
||||
{
|
||||
/* The name=value string has no '=' This is a bug! */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user