fix free problem.

Signed-off-by: yudechen <chenyude@huawei.com>
Change-Id: Icfa8086d93f0835141877df3edc118d6cb15bb8c
This commit is contained in:
yudechen
2022-05-09 12:24:30 +08:00
parent 98ba2f5b7a
commit 2439b8cc72
+1 -4
View File
@@ -73,7 +73,7 @@ static char* getSystemCapability()
retBool = EncodeOsSyscap(osOutput);
if (!retBool) {
PRINT_ERR("get encoded os syscap failed.");
goto FREE_OSOUTPUT;
return nullptr;
}
retBool = EncodePrivateSyscap(&priOutput, &priOutputLen);
if (!retBool) {
@@ -146,9 +146,6 @@ FREE_PRICAP_ARRAY:
free(priCapArray);
FREE_PRIOUTPUT:
free(priOutput);
FREE_OSOUTPUT:
free(osOutput);
temp = nullptr;
return allSyscapBUffer;
}