mirror of
https://gitee.com/openharmony/startup_appspawn
synced 2024-11-27 01:00:38 +00:00
指针使用前判空
Signed-off-by: ohxianzhi <duxianzhi@huawei.com>
This commit is contained in:
parent
7142749cc1
commit
35ea789704
@ -151,6 +151,7 @@ int SetUidGidFilter(const AppSpawnMgr *content)
|
||||
int SetSeccompFilter(const AppSpawnMgr *content, const AppSpawningCtx *property)
|
||||
{
|
||||
#ifdef WITH_SECCOMP
|
||||
APPSPAWN_CHECK(property != nullptr, return 0, "property is NULL");
|
||||
const char *appName = APP_NAME;
|
||||
SeccompFilterType type = APP;
|
||||
|
||||
|
@ -208,7 +208,7 @@ APPSPAWN_STATIC void ProcessSignal(const struct signalfd_siginfo *siginfo)
|
||||
|
||||
static void AppSpawningCtxOnClose(const AppSpawnMgr *mgr, AppSpawningCtx *ctx, void *data)
|
||||
{
|
||||
if (ctx->message == NULL || ctx->message->connection != data) {
|
||||
if (ctx == NULL || ctx->message == NULL || ctx->message->connection != data) {
|
||||
return;
|
||||
}
|
||||
APPSPAWN_LOGI("Kill process, pid: %{public}d app: %{public}s", ctx->pid, GetProcessName(ctx));
|
||||
|
Loading…
Reference in New Issue
Block a user