Critical bug fix! Reset allocated memory

This bus has been there for a long time.
memset the newly allocated memory to prevent issues.
This commit is contained in:
topjohnwu 2017-02-04 04:25:41 +08:00
parent 76eb629fc2
commit 10bf497cda

View File

@ -60,6 +60,7 @@ static int add_irule(int s, int t, int c, int p, int effect, int not) {
if (av == NULL) {
av = cmalloc(sizeof(*av));
memset(av, 0, sizeof(*av));
av->data |= 1U << (p - 1);
int ret = avtab_insert(&policy->te_avtab, &key, av);
if (ret) {