From c5e6606dfdbeefce988dd78df58af19c3fb6ddc5 Mon Sep 17 00:00:00 2001 From: "Serge E. Hallyn" Date: Mon, 15 May 2006 09:43:48 -0700 Subject: [PATCH] --- yaml --- r: 26693 b: refs/heads/master c: 0cccca06f9870eb6daa89357b8a99ad041865553 h: refs/heads/master i: 26691: e8227c8853c8dc3f42a3dfdad80fd3e0581442e2 v: v3 --- [refs] | 2 +- trunk/security/selinux/ss/services.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 99e09acfa080..fae13f23ecfb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9be2f7c38e0bd64e8a0f74ea68df1e73e2ddfcc3 +refs/heads/master: 0cccca06f9870eb6daa89357b8a99ad041865553 diff --git a/trunk/security/selinux/ss/services.c b/trunk/security/selinux/ss/services.c index 7177e98df7f3..c284dbb8b8c0 100644 --- a/trunk/security/selinux/ss/services.c +++ b/trunk/security/selinux/ss/services.c @@ -594,6 +594,10 @@ int security_sid_to_context(u32 sid, char **scontext, u32 *scontext_len) *scontext_len = strlen(initial_sid_to_string[sid]) + 1; scontextp = kmalloc(*scontext_len,GFP_ATOMIC); + if (!scontextp) { + rc = -ENOMEM; + goto out; + } strcpy(scontextp, initial_sid_to_string[sid]); *scontext = scontextp; goto out;