rexec: fix free error in error handing

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2022-02-10 18:21:38 +08:00 committed by Xiang Xiao
parent 66d854371b
commit a1eb3f66fa
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ int rexec_af(FAR char **ahost, int inport, FAR const char *user,
conn_out:
close(sock);
sock_out:
free(ahost);
free(*ahost);
addr_out:
freeaddrinfo(res);
return -1;