net/inet and net/tcp: Fix tcp close flow; free the connection after all tcp close process finished.

This commit is contained in:
zhangyuan7
2019-08-30 06:43:45 -06:00
committed by Gregory Nutt
parent 2236916be6
commit b33fc302f0
4 changed files with 26 additions and 17 deletions
+3 -3
View File
@@ -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! */