mirror of
https://github.com/openharmony/developtools_syscap_codec.git
synced 2026-08-27 02:11:19 -04:00
@@ -705,7 +705,6 @@ static int32_t GetSyscapStr(char *input, char const *priSyscapStr, uint32_t* osS
|
||||
return -1;
|
||||
}
|
||||
priSyscapStr = ctx;
|
||||
free(ctx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -736,11 +735,6 @@ int32_t DecodeStringPCIDToJson(char *input, char *outDirPath)
|
||||
goto ADD_JSON_FAILED;
|
||||
}
|
||||
|
||||
if (priSyscapStr == null){
|
||||
PRINT_ERR("priSyscapStr is null.\n");
|
||||
goto ADD_JSON_FAILED;
|
||||
}
|
||||
|
||||
if (AddPriSyscapToJsonObj(priSyscapStr, (uint32_t)strlen(priSyscapStr), sysCapObj) != 0) {
|
||||
PRINT_ERR("Add private syscap json object failed.\n");
|
||||
goto ADD_JSON_FAILED;
|
||||
|
||||
@@ -706,6 +706,9 @@ int32_t ComparePcidWithRpcidString(char *pcidFile, char *rpcidFile, uint32_t typ
|
||||
if (ret != 0) {
|
||||
PRINT_ERR("Separate syscap from string failed. ret = %d\n", ret);
|
||||
free(pcidContent);
|
||||
free(rpcidContent);
|
||||
free(pcidPriSyscap);
|
||||
free(rpcidPriSyscap);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user