diff options
Diffstat (limited to 'ipc/sem.c')
-rw-r--r-- | ipc/sem.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 | ||