Skip to content

Commit

Permalink
fix: need goto out after g_set_error
Browse files Browse the repository at this point in the history
goto out needs to be executed after g_set_error , otherwise the assertion will be triggered in g_assert (process != NULL);
  • Loading branch information
KT-lcz authored Dec 3, 2024
1 parent 252b7f3 commit e140175
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/polkitbackend/polkitbackendsessionmonitor-systemd.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
POLKIT_ERROR_NOT_SUPPORTED,
"Cannot get session for subject of type %s",
g_type_name (G_TYPE_FROM_INSTANCE (subject)));
goto out;
}

#if HAVE_SD_PIDFD_GET_SESSION
Expand Down

0 comments on commit e140175

Please sign in to comment.