Skip to content

Commit

Permalink
Bugfix in clean up code.
Browse files Browse the repository at this point in the history
  • Loading branch information
eudyptula committed Dec 21, 2015
1 parent 9272a92 commit 3cf283b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions REST/hpdREST/src/hpd_rest.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,20 @@ int hpd_rest_init(struct hpd_rest *data, HomePort *hp, int port)
"/devices",
lri_getConfiguration, NULL, NULL, NULL,
NULL, hp);

return 0;
}

int hpd_rest_deinit(struct hpd_rest *data, HomePort *hp)
{
Adapter *adapter;
Device *device;
DL_FOREACH(hp->configuration->adapter_head, adapter) {
DL_FOREACH(adapter->device_head, device) {
on_dev_detach(data, device);
}
}
homePortUnsubscribe(data->dev_listener);
homePortFreeListener(data->dev_listener);
lr_stop(data->lr);

lr_destroy(data->lr);

return 0;
Expand Down

0 comments on commit 3cf283b

Please sign in to comment.