Skip to content

Commit

Permalink
Merge branch 'master' of git://git.infradead.org/users/pcmoore/selinu…
Browse files Browse the repository at this point in the history
…x into next
  • Loading branch information
James Morris committed Jan 8, 2014
2 parents d4a82a4 + 8ed8146 commit 923b49f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion security/selinux/ss/policydb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1995,7 +1995,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;
Expand Down

0 comments on commit 923b49f

Please sign in to comment.