mirror of
https://gitee.com/openharmony/developtools_hdc
synced 2024-11-23 07:02:43 +00:00
commit
0813aaaf94
@ -133,7 +133,7 @@ static void SetSelinuxLabel(bool isRoot)
|
||||
WRITE_LOG(LOG_WARN, "SetSelinuxLabel isRoot:%d", isRoot);
|
||||
return;
|
||||
}
|
||||
if ((strcmp(con, "u:r:hdcd:s0") != 0) && (strcmp(con, "u:r:updater:s0") != 0)) {
|
||||
if ((con != nullptr) && (strcmp(con, "u:r:hdcd:s0") != 0) && (strcmp(con, "u:r:updater:s0") != 0)) {
|
||||
WRITE_LOG(LOG_WARN, "SetSelinuxLabel con:%s isRoot:%d", con, isRoot);
|
||||
freecon(con);
|
||||
return;
|
||||
|
@ -161,7 +161,7 @@ static void SetSelinuxLabel()
|
||||
if (getcon(&con) != 0) {
|
||||
return;
|
||||
}
|
||||
if ((strcmp(con, "u:r:hdcd:s0") != 0) && (strcmp(con, "u:r:updater:s0") != 0)) {
|
||||
if ((con != nullptr) && (strcmp(con, "u:r:hdcd:s0") != 0) && (strcmp(con, "u:r:updater:s0") != 0)) {
|
||||
freecon(con);
|
||||
return;
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ static bool GetCmdInPath(char *cmd, int cmdBufLen, char *envp[])
|
||||
path = cp + 1;
|
||||
} while (cp != nullptr);
|
||||
|
||||
free(pathBak);
|
||||
delete [] pathBak;
|
||||
if (!findSuccess) {
|
||||
WriteTty(COMMAND_NOT_FOUND);
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user