We should not unref the policy on parsing errors becase the policy
lifetime is attached to the lifetime of the file. When the file
is removed we remove it from the hash table.
const char *ident)
{
struct policy_data *policy;
+ int err;
if (ident == NULL)
return;
if (event->mask & IN_MODIFY) {
connman_info("Policy modifed for '%s'", ident);
- if (load_policy(policy) < 0) {
- remove_policy(policy);
+ err = load_policy(policy);
+ if (err < 0) {
+ connman_warn("Loading policy file '%s' failed with %s",
+ ident, strerror(-err));
return;
}
}