diff options
author | Mark Brown <broonie@linaro.org> | 2014-02-14 12:15:46 +0000 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-14 12:15:46 +0000 |
commit | 8415e604452966f981f20cb4d8a8a30e38a772dd (patch) | |
tree | 0c111cf6c6ed487c9baee37275621097d57f5127 /security | |
parent | 4b9c8ddadce3ec70fa5d93875adeda861b21c84e (diff) | |
parent | 29b5f720990fafc302a034468455426dd662e101 (diff) |
Merge tag 'v3.10.30' into linux-linaro-lskHEADlinux-linaro-lsk-v3.10linux-linaro-lsk
This is the 3.10.30 stable release
Diffstat (limited to 'security')
-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 9cd9b7c661e..142a59f3979 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c @@ -1941,7 +1941,19 @@ static int filename_trans_read(struct policydb *p, void *fp) if (rc) goto out; - hashtab_insert(p->filename_trans, ft, otype); + rc = hashtab_insert(p->filename_trans, ft, otype); + if (rc) { + /* + * Do not return -EEXIST to the caller, or the system + * will not boot. + */ + if (rc != -EEXIST) + goto out; + /* But free memory to avoid memory leak. */ + kfree(ft); + kfree(name); + kfree(otype); + } } hash_eval(p->filename_trans, "filenametr"); return 0; |