aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/sem.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/sem.c')
-rw-r--r--ipc/sem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipc/sem.c b/ipc/sem.c
index 7617f4f34edc..35952c0bae46 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -283,10 +283,10 @@ static int newary(struct ipc_namespace *ns, struct ipc_params *params)
283 } 283 }
284 284
285 id = ipc_addid(&sem_ids(ns), &sma->sem_perm, ns->sc_semmni); 285 id = ipc_addid(&sem_ids(ns), &sma->sem_perm, ns->sc_semmni);
286 if(id == -1) { 286 if (id < 0) {
287 security_sem_free(sma); 287 security_sem_free(sma);
288 ipc_rcu_putref(sma); 288 ipc_rcu_putref(sma);
289 return -ENOSPC; 289 return id;
290 } 290 }
291 ns->used_sems += nsems; 291 ns->used_sems += nsems;
292 292