From 0984c858ba4890f226db964600369d3edcb3a25c Mon Sep 17 00:00:00 2001 From: xuezhou_yan Date: Tue, 5 Aug 2025 19:54:30 +0800 Subject: [PATCH 1/6] =?UTF-8?q?[Bug]:=20=E5=91=8A=E8=AD=A6=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E6=B8=85=E7=90=86=E6=B2=A1=E6=9C=89=E9=87=8A?= =?UTF-8?q?=E6=94=BE=E7=9A=84=E5=86=85=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuezhou_yan --- src/syscap_tool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/syscap_tool.c b/src/syscap_tool.c index d58259b..038541f 100644 --- a/src/syscap_tool.c +++ b/src/syscap_tool.c @@ -750,5 +750,7 @@ int32_t ComparePcidWithRpcidString(char *pcidFile, char *rpcidFile, uint32_t typ printf("Fail! The pcid does not meet the rpcid\n"); } + FreePointerMemory(pcidContent, rpcidContent, pcidPriSyscap, rpcidPriSyscap); + return 0; } -- Gitee From ddd66cb87c8fa1744ffde3ea98255b0d293c9f5b Mon Sep 17 00:00:00 2001 From: xuezhou_yan Date: Tue, 5 Aug 2025 19:54:30 +0800 Subject: [PATCH 2/6] =?UTF-8?q?[Bug]:=20=E5=91=8A=E8=AD=A6=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E6=B8=85=E7=90=86=E6=B2=A1=E6=9C=89=E9=87=8A?= =?UTF-8?q?=E6=94=BE=E7=9A=84=E5=86=85=E5=AD=98=20https://gitee.com/openha?= =?UTF-8?q?rmony/developtools=5Fsyscap=5Fcodec/issues/ICRCLU?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuezhou_yan --- src/syscap_tool.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/syscap_tool.c b/src/syscap_tool.c index d58259b..fedff4d 100644 --- a/src/syscap_tool.c +++ b/src/syscap_tool.c @@ -750,5 +750,12 @@ int32_t ComparePcidWithRpcidString(char *pcidFile, char *rpcidFile, uint32_t typ printf("Fail! The pcid does not meet the rpcid\n"); } + if (type == TYPE_FILE) { + FreePointerMemory(pcidContent, rpcidContent, pcidPriSyscap, rpcidPriSyscap); + } else if (type == TYPE_STRING) { + SafeFree(pcidPriSyscap); + SafeFree(rpcidPriSyscap); + } + return 0; } -- Gitee From 32ddec990f5e37cba6f6547bb239fae2b73e0817 Mon Sep 17 00:00:00 2001 From: xuezhou_yan Date: Wed, 6 Aug 2025 15:03:56 +0800 Subject: [PATCH 3/6] =?UTF-8?q?[Bug]:=20=E5=91=8A=E8=AD=A6=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E6=B8=85=E7=90=86=E6=B2=A1=E6=9C=89=E9=87=8A?= =?UTF-8?q?=E6=94=BE=E7=9A=84=E5=86=85=E5=AD=98=20https://gitee.com/openha?= =?UTF-8?q?rmony/developtools=5Fsyscap=5Fcodec/issues/ICRCLU?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuezhou_yan --- src/syscap_tool.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/syscap_tool.c b/src/syscap_tool.c index fedff4d..4ab4a6a 100644 --- a/src/syscap_tool.c +++ b/src/syscap_tool.c @@ -697,6 +697,20 @@ static int32_t CompareVersion(uint32_t *pcidOsArray, uint32_t *rpcidOsAarry) return versionFlag; } +static void FreePointerMemoryEnd(char *pcidContent, char *rpcidContent, char *pcidPriSyscap, char *rpcidPriSyscap, uint32_t type) +{ + printf("After the compare cmd is executed, relase the memory.\n"); + if (type == TYPE_FILE) { + SafeFree(pcidContent); + SafeFree(rpcidPriSyscap); + SafeFree(rpcidContent); + SafeFree(pcidPriSyscap); + } else if (type == TYPE_STRING) { + SafeFree(rpcidPriSyscap); + SafeFree(pcidPriSyscap); + } +} + int32_t ComparePcidWithRpcidString(char *pcidFile, char *rpcidFile, uint32_t type) { int32_t ret; @@ -750,12 +764,6 @@ int32_t ComparePcidWithRpcidString(char *pcidFile, char *rpcidFile, uint32_t typ printf("Fail! The pcid does not meet the rpcid\n"); } - if (type == TYPE_FILE) { - FreePointerMemory(pcidContent, rpcidContent, pcidPriSyscap, rpcidPriSyscap); - } else if (type == TYPE_STRING) { - SafeFree(pcidPriSyscap); - SafeFree(rpcidPriSyscap); - } - + FreePointerMemoryEnd(pcidContent, rpcidContent, pcidPriSyscap, rpcidPriSyscap, type); return 0; } -- Gitee From 024d293b611c203b2714c8d52ec2c841bff4b732 Mon Sep 17 00:00:00 2001 From: xuezhou_yan Date: Wed, 6 Aug 2025 15:52:28 +0800 Subject: [PATCH 4/6] =?UTF-8?q?[Bug]:=20=E5=91=8A=E8=AD=A6=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E6=B8=85=E7=90=86=E6=B2=A1=E6=9C=89=E9=87=8A?= =?UTF-8?q?=E6=94=BE=E7=9A=84=E5=86=85=E5=AD=98=20https://gitee.com/openha?= =?UTF-8?q?rmony/developtools=5Fsyscap=5Fcodec/issues/ICRCLU?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuezhou_yan --- src/syscap_tool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/syscap_tool.c b/src/syscap_tool.c index 4ab4a6a..78a0119 100644 --- a/src/syscap_tool.c +++ b/src/syscap_tool.c @@ -697,7 +697,8 @@ static int32_t CompareVersion(uint32_t *pcidOsArray, uint32_t *rpcidOsAarry) return versionFlag; } -static void FreePointerMemoryEnd(char *pcidContent, char *rpcidContent, char *pcidPriSyscap, char *rpcidPriSyscap, uint32_t type) +static void FreePointerMemoryEnd(char *pcidContent, char *rpcidContent, + char *pcidPriSyscap, char *rpcidPriSyscap, uint32_t type) { printf("After the compare cmd is executed, relase the memory.\n"); if (type == TYPE_FILE) { -- Gitee From 6dc4098c2439b6c8774d6d157513897dd6404017 Mon Sep 17 00:00:00 2001 From: xuezhou_yan Date: Wed, 6 Aug 2025 16:27:03 +0800 Subject: [PATCH 5/6] =?UTF-8?q?[Bug]:=20=E5=91=8A=E8=AD=A6=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E6=B8=85=E7=90=86=E6=B2=A1=E6=9C=89=E9=87=8A?= =?UTF-8?q?=E6=94=BE=E7=9A=84=E5=86=85=E5=AD=98=20https://gitee.com/openha?= =?UTF-8?q?rmony/developtools=5Fsyscap=5Fcodec/issues/ICRCLU?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuezhou_yan --- src/syscap_tool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/syscap_tool.c b/src/syscap_tool.c index 78a0119..89f1988 100644 --- a/src/syscap_tool.c +++ b/src/syscap_tool.c @@ -698,7 +698,7 @@ static int32_t CompareVersion(uint32_t *pcidOsArray, uint32_t *rpcidOsAarry) } static void FreePointerMemoryEnd(char *pcidContent, char *rpcidContent, - char *pcidPriSyscap, char *rpcidPriSyscap, uint32_t type) + char *pcidPriSyscap, char *rpcidPriSyscap, uint32_t type) { printf("After the compare cmd is executed, relase the memory.\n"); if (type == TYPE_FILE) { -- Gitee From 8e47cd925800f55177072f9510d110e37e22558a Mon Sep 17 00:00:00 2001 From: xuezhou_yan Date: Thu, 7 Aug 2025 14:33:28 +0800 Subject: [PATCH 6/6] =?UTF-8?q?[Bug]:=20=E5=91=8A=E8=AD=A6=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E6=B8=85=E7=90=86=E6=B2=A1=E6=9C=89=E9=87=8A?= =?UTF-8?q?=E6=94=BE=E7=9A=84=E5=86=85=E5=AD=98=20https://gitee.com/openha?= =?UTF-8?q?rmony/developtools=5Fsyscap=5Fcodec/issues/ICRCLU?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuezhou_yan --- src/syscap_tool.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/syscap_tool.c b/src/syscap_tool.c index 89f1988..de55c77 100644 --- a/src/syscap_tool.c +++ b/src/syscap_tool.c @@ -700,7 +700,6 @@ static int32_t CompareVersion(uint32_t *pcidOsArray, uint32_t *rpcidOsAarry) static void FreePointerMemoryEnd(char *pcidContent, char *rpcidContent, char *pcidPriSyscap, char *rpcidPriSyscap, uint32_t type) { - printf("After the compare cmd is executed, relase the memory.\n"); if (type == TYPE_FILE) { SafeFree(pcidContent); SafeFree(rpcidPriSyscap); -- Gitee