aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/msg.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/msg.c')
-rw-r--r--ipc/msg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipc/msg.c b/ipc/msg.c
index ccf5f495db7b..fdf3db5731ce 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -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);