apparmor: fix invalid reference to index variable of iterator line 836
authorJohn Johansen <john.johansen@canonical.com>
Thu, 6 Apr 2017 13:55:22 +0000 (06:55 -0700)
committerJames Morris <james.l.morris@oracle.com>
Thu, 6 Apr 2017 22:58:36 +0000 (08:58 +1000)
commitb9b144bcafbdd53f68e227968009327b76db08a4
treec42d597bf9be9d796fd323e4847795d1adf0e562
parent9814448da7a84dd50b69e4ada2d7d1c042493daf
apparmor: fix invalid reference to index variable of iterator line 836

Once the loop on lines 836-853 is complete and exits normally, ent is a
pointer to the dummy list head value.  The derefernces accessible from eg
the goto fail on line 860 or the various goto fail_lock's afterwards thus
seem incorrect.

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
security/apparmor/policy.c