diff options
Diffstat (limited to 'ipc/msg.c')
-rw-r--r-- | ipc/msg.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -203,10 +203,10 @@ static int newque(struct ipc_namespace *ns, struct ipc_params *params) | |||
203 | * ipc_addid() locks msq | 203 | * ipc_addid() locks msq |
204 | */ | 204 | */ |
205 | id = ipc_addid(&msg_ids(ns), &msq->q_perm, ns->msg_ctlmni); | 205 | id = ipc_addid(&msg_ids(ns), &msq->q_perm, ns->msg_ctlmni); |
206 | if (id == -1) { | 206 | if (id < 0) { |
207 | security_msg_queue_free(msq); | 207 | security_msg_queue_free(msq); |
208 | ipc_rcu_putref(msq); | 208 | ipc_rcu_putref(msq); |
209 | return -ENOSPC; | 209 | return id; |
210 | } | 210 | } |
211 | 211 | ||
212 | msq->q_perm.id = msg_buildid(id, msq->q_perm.seq); | 212 | msq->q_perm.id = msg_buildid(id, msq->q_perm.seq); |