From 855dab2034375cec52120ab95445975705ad82e5 Mon Sep 17 00:00:00 2001 From: yangkan Date: Sat, 19 Jul 2025 17:33:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangkan --- services/sandbox/sandbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/sandbox/sandbox.c b/services/sandbox/sandbox.c index fb2735647..9b24a7434 100755 --- a/services/sandbox/sandbox.c +++ b/services/sandbox/sandbox.c @@ -278,7 +278,7 @@ static int AddSymbolLinksToSandbox(sandbox_t *sandbox, cJSON *item, const char * tmpLink->target = strdup(target); BEGET_ERROR_CHECK(tmpLink->target != NULL, free(tmpLink); return -1, "Failed to dup target"); tmpLink->linkName = strdup(name); - BEGET_ERROR_CHECK(tmpLink->linkName != NULL, free(tmpLink); return -1, "Failed to dup linkName"); + BEGET_ERROR_CHECK(tmpLink->linkName != NULL, free(tmpLink->target); free(tmpLink); return -1, "Failed to dup linkName"); OH_ListInit(&tmpLink->node); RemoveOldSandboxLinkListNode(&sandbox->linksHead, tmpLink->linkName); OH_ListAddTail(&sandbox->linksHead, &tmpLink->node); -- Gitee