sanitize audit_ipc_set_perm()
* get rid of allocations
* make it return void
* simplify callers
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
diff --git a/ipc/util.c b/ipc/util.c
index 579552ab..7585a72 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -803,13 +803,9 @@
}
audit_ipc_obj(ipcp);
-
- if (cmd == IPC_SET) {
- err = audit_ipc_set_perm(extra_perm, perm->uid,
+ if (cmd == IPC_SET)
+ audit_ipc_set_perm(extra_perm, perm->uid,
perm->gid, perm->mode);
- if (err)
- goto out_unlock;
- }
euid = current_euid();
if (euid == ipcp->cuid ||
@@ -817,7 +813,6 @@
return ipcp;
err = -EPERM;
-out_unlock:
ipc_unlock(ipcp);
out_up:
up_write(&ids->rw_mutex);