From a1eb3f66fa50e43270502caa54c48d3fca467484 Mon Sep 17 00:00:00 2001 From: ligd Date: Thu, 10 Feb 2022 18:21:38 +0800 Subject: [PATCH] rexec: fix free error in error handing Signed-off-by: ligd --- libs/libc/netdb/lib_rexec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/libc/netdb/lib_rexec.c b/libs/libc/netdb/lib_rexec.c index fa9da4c2fb..33735c6056 100644 --- a/libs/libc/netdb/lib_rexec.c +++ b/libs/libc/netdb/lib_rexec.c @@ -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;