diff options
author | James Morris <james.l.morris@oracle.com> | 2014-01-08 01:22:32 -0500 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2014-01-08 01:22:32 -0500 |
commit | 923b49ff69fcbffe6f8b2739de218c45544392a7 (patch) | |
tree | 44d03d61cad1edd916e5e0d88641353aa7cd0d4c /security/selinux | |
parent | d4a82a4a033d563f1dc2c944eec2358cb38432d0 (diff) | |
parent | 8ed814602876bec9bad2649ca17f34b499357a1c (diff) |
Merge branch 'master' of git://git.infradead.org/users/pcmoore/selinux into next
Diffstat (limited to 'security/selinux')
-rw-r--r-- | security/selinux/ss/policydb.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index dc4011643b55..c0f498842129 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c | |||
@@ -1995,7 +1995,19 @@ static int filename_trans_read(struct policydb *p, void *fp) | |||
1995 | if (rc) | 1995 | if (rc) |
1996 | goto out; | 1996 | goto out; |
1997 | 1997 | ||
1998 | hashtab_insert(p->filename_trans, ft, otype); | 1998 | rc = hashtab_insert(p->filename_trans, ft, otype); |
1999 | if (rc) { | ||
2000 | /* | ||
2001 | * Do not return -EEXIST to the caller, or the system | ||
2002 | * will not boot. | ||
2003 | */ | ||
2004 | if (rc != -EEXIST) | ||
2005 | goto out; | ||
2006 | /* But free memory to avoid memory leak. */ | ||
2007 | kfree(ft); | ||
2008 | kfree(name); | ||
2009 | kfree(otype); | ||
2010 | } | ||
1999 | } | 2011 | } |
2000 | hash_eval(p->filename_trans, "filenametr"); | 2012 | hash_eval(p->filename_trans, "filenametr"); |
2001 | return 0; | 2013 | return 0; |