policy: kdbus_policy_set() make sure we restore the right entries
authorDjalal Harouni <tixxdz@opendz.org>
Fri, 20 Jun 2014 16:50:02 +0000 (17:50 +0100)
committerDaniel Mack <zonque@gmail.com>
Fri, 20 Jun 2014 17:28:52 +0000 (19:28 +0200)
commit8da9ffe7066698e6f620dd2f203ae8d93aca45f8
tree37fd9b732d36335700cb52ccdef14c36683ea3f3
parent4d2dd11c0bb5803f17b5f78074996bf468abb4ec
policy: kdbus_policy_set() make sure we restore the right entries

If kdbus_policy_set() fails we try to restore the entries that were
previously saved in a list, however due to a typo that logic was trying
to access a previously freed entry which will just break things...
So fix the typo 'l->e' instead of 'e'.

This fixes a bug triggered by test-kdbus-policy and makes the code able
to restore previously saved entries in case of errors.

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
policy.c