From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753541Ab1ATScI (ORCPT ); Thu, 20 Jan 2011 13:32:08 -0500 Received: from caiajhbdcaid.dreamhost.com ([208.97.132.83]:48603 "EHLO homiemail-a2.g.dreamhost.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753382Ab1ATScG (ORCPT ); Thu, 20 Jan 2011 13:32:06 -0500 Subject: [PATCH 1/3] selinux: return -ENOMEM when memory allocation fails From: Davidlohr Bueso To: Stephen Smalley , James Morris , Eric Paris Cc: LKML Content-Type: text/plain; charset="UTF-8" Date: Thu, 20 Jan 2011 15:31:58 -0300 Message-ID: <1295548318.2089.11.camel@offworld> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Davidlohr Bueso Signed-off-by: Davidlohr Bueso --- security/selinux/ss/conditional.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c index c3f845c..a533732 100644 --- a/security/selinux/ss/conditional.c +++ b/security/selinux/ss/conditional.c @@ -178,7 +178,7 @@ int cond_init_bool_indexes(struct policydb *p) p->bool_val_to_struct = (struct cond_bool_datum **) kmalloc(p->p_bools.nprim * sizeof(struct cond_bool_datum *), GFP_KERNEL); if (!p->bool_val_to_struct) - return -1; + return -ENOMEM; return 0; } -- 1.7.1