Skip to content

Commit

Permalink
model: fix to call (netif) dbus object destructors
Browse files Browse the repository at this point in the history
  • Loading branch information
mtomaschewski committed Oct 1, 2018
1 parent 2423eb7 commit e2e9ee0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/dbus-object.c
Expand Up @@ -113,12 +113,15 @@ __ni_dbus_object_free(ni_dbus_object_t *object)
if (object->client_object)
__ni_dbus_client_object_destroy(object);

ni_string_free(&object->name);
ni_string_free(&object->path);

while ((child = object->children) != NULL)
__ni_dbus_object_free(child);

if (object->handle && object->class && object->class->destroy)
object->class->destroy(object);

ni_string_free(&object->name);
ni_string_free(&object->path);

free(object->interfaces);
free(object);
}
Expand Down

0 comments on commit e2e9ee0

Please sign in to comment.