]> git.baikalelectronics.ru Git - kernel.git/commit
audit: move calcs after alloc and check when logging set loginuid
authorRichard Guy Briggs <rgb@redhat.com>
Tue, 28 Jun 2016 16:06:58 +0000 (12:06 -0400)
committerPaul Moore <paul@paul-moore.com>
Tue, 28 Jun 2016 19:40:17 +0000 (15:40 -0400)
commit17b14b18981e7aa2169ee441b6cc6861373887a7
treec14c93cbd7f2a74398b7a8be7548d88043eca8e1
parenta911130075f18a8a47532ae8f59035f1549073d7
audit: move calcs after alloc and check when logging set loginuid

Move the calculations of values after the allocation in case the
allocation fails.  This avoids wasting effort in the rare case that it
fails, but more importantly saves us extra logic to release the tty
ref.

Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
kernel/auditsc.c