mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
execute: use _cleanup_ logic where appropriate
(cherry picked from commit 46e5bbab58
)
This commit is contained in:
parent
9c560d2015
commit
9b2954b794
@ -1182,10 +1182,11 @@ static int setup_pam(
|
||||
};
|
||||
|
||||
_cleanup_(barrier_destroy) Barrier barrier = BARRIER_NULL;
|
||||
_cleanup_strv_free_ char **e = NULL;
|
||||
pam_handle_t *handle = NULL;
|
||||
sigset_t old_ss;
|
||||
int pam_code = PAM_SUCCESS, r;
|
||||
char **nv, **e = NULL;
|
||||
char **nv;
|
||||
bool close_session = false;
|
||||
pid_t pam_pid = 0, parent_pid;
|
||||
int flags = 0;
|
||||
@ -1382,9 +1383,7 @@ fail:
|
||||
(void) pam_end(handle, pam_code | flags);
|
||||
}
|
||||
|
||||
strv_free(e);
|
||||
closelog();
|
||||
|
||||
return r;
|
||||
#else
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user