From 5ea23abd80eac0d77844ff4a83fce3cd628db79d Mon Sep 17 00:00:00 2001 From: arvinzzz Date: Fri, 17 Jun 2022 16:54:51 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20d8e4215=20from=20https://gitee.com/arvi?= =?UTF-8?q?nzzz/kernel=5Fliteos=5Fm/pulls/718=20fixed=207bb5353=20from=20h?= =?UTF-8?q?ttps://gitee.com/arvinzzz/kernel=5Fliteos=5Fm/pulls/717=20fixed?= =?UTF-8?q?=20d837ed3=20from=20https://gitee.com/arvinzzz/kernel=5Fliteos?= =?UTF-8?q?=5Fm/pulls/716=20fix:=20ping=E5=91=BD=E4=BB=A4=E5=86=85?= =?UTF-8?q?=E8=AE=BF=E9=97=AE=E9=87=8E=E6=8C=87=E9=92=88=E5=8F=8A=E5=86=85?= =?UTF-8?q?=E5=AD=98=E6=B3=84=E6=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: arvinzzz --- components/net/lwip-2.1/porting/src/api_shell.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/net/lwip-2.1/porting/src/api_shell.c b/components/net/lwip-2.1/porting/src/api_shell.c index 1231e637..e513db1c 100644 --- a/components/net/lwip-2.1/porting/src/api_shell.c +++ b/components/net/lwip-2.1/porting/src/api_shell.c @@ -586,7 +586,6 @@ u32_t OsShellPing(int argc, const char **argv) stPingTask.uwArg = (UINTPTR)parg; ret = LOS_TaskCreate((UINT32 *)(&ping_taskid), &stPingTask); if (ret != LOS_OK) { - free(parg); PRINTK("ping_task create failed 0x%08x.\n", ret); count = LWIP_SHELL_CMD_PING_RETRY_TIMES; } else { @@ -602,6 +601,8 @@ u32_t OsShellPing(int argc, const char **argv) PRINTK("Ping cmd failed due some errors\n"); } + free(parg); + return LOS_OK; ping_error: lwip_ping_usage();