diff options
Diffstat (limited to 'src/modules/module-device-restore.c')
-rw-r--r-- | src/modules/module-device-restore.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/modules/module-device-restore.c b/src/modules/module-device-restore.c index 27c69f31..0a41b84a 100644 --- a/src/modules/module-device-restore.c +++ b/src/modules/module-device-restore.c @@ -263,7 +263,7 @@ static pa_hook_result_t source_fixate_hook_callback(pa_core *c, pa_source_new_da int pa__init(pa_module*m) { pa_modargs *ma = NULL; struct userdata *u; - char *fname, *state_dir; + char *fname, *runtime_dir; char hn[256]; pa_sink *sink; pa_source *source; @@ -290,11 +290,11 @@ int pa__init(pa_module*m) { if (!pa_get_host_name(hn, sizeof(hn))) goto fail; - if (!(state_dir = pa_get_state_dir())) + if (!(runtime_dir = pa_get_runtime_dir())) goto fail; - fname = pa_sprintf_malloc("%s/device-volumes.%s.gdbm", state_dir, hn); - pa_xfree(state_dir); + fname = pa_sprintf_malloc("%s/device-volumes.%s.gdbm", runtime_dir, hn); + pa_xfree(runtime_dir); if (!(u->gdbm_file = gdbm_open(fname, 0, GDBM_WRCREAT, 0600, NULL))) { pa_log("Failed to open volume database '%s': %s", fname, gdbm_strerror(gdbm_errno)); @@ -316,6 +316,7 @@ int pa__init(pa_module*m) { fail: pa__done(m); + if (ma) pa_modargs_free(ma); |