diff --git a/sync/device.c b/sync/device.c index 3bfd942..8c21aa7 100644 --- a/sync/device.c +++ b/sync/device.c @@ -99,6 +99,12 @@ struct sync_device *sync_create_device(const char *base) return d; } +void sync_destroy_device(struct sync_device *d) +{ + free(d->base); + sync_data_deinit(&d->data); +} + #ifdef SYNC_PLAYER static int load_track_data(struct sync_track *t, const char *path) diff --git a/sync/device.h b/sync/device.h index 8588ac6..9fad9e9 100644 --- a/sync/device.h +++ b/sync/device.h @@ -13,7 +13,7 @@ extern "C" { #endif struct sync_device { - const char *base; + char *base; struct sync_data data; #ifndef SYNC_PLAYER diff --git a/sync/sync.h b/sync/sync.h index 2944f2d..cc973de 100644 --- a/sync/sync.h +++ b/sync/sync.h @@ -13,6 +13,7 @@ struct sync_device; struct sync_track; struct sync_device *sync_create_device(const char *); +void sync_destroy_device(struct sync_device *); #ifndef SYNC_PLAYER struct sync_cb {