diff options
Diffstat (limited to 'modules/pam_rootok')
-rw-r--r-- | modules/pam_rootok/pam_rootok.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/pam_rootok/pam_rootok.c b/modules/pam_rootok/pam_rootok.c index 80a67f6d..accba21a 100644 --- a/modules/pam_rootok/pam_rootok.c +++ b/modules/pam_rootok/pam_rootok.c @@ -73,12 +73,15 @@ log_callback (int type UNUSED, const char *fmt, ...) if (audit_fd >= 0) { char *buf; - if (vasprintf (&buf, fmt, ap) < 0) + if (vasprintf (&buf, fmt, ap) < 0) { + va_end(ap); return 0; + } audit_log_user_avc_message(audit_fd, AUDIT_USER_AVC, buf, NULL, NULL, NULL, 0); audit_close(audit_fd); free(buf); + va_end(ap); return 0; } |