summaryrefslogtreecommitdiffstats
path: root/src/state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/state.c')
-rw-r--r--src/state.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/state.c b/src/state.c
index d98b80b..8442949 100644
--- a/src/state.c
+++ b/src/state.c
@@ -315,12 +315,10 @@ abstract_path(LV2_State_Map_Path_Handle handle, const char* abs_path)
}
} else if (state->link_dir) {
// New path outside state directory, make a link
- char* const name = lilv_path_filename(real_path);
+ const ZixStringView name = zix_path_filename(real_path);
// Find a free name in the (virtual) state directory
- path = lilv_find_free_path(name, lilv_state_has_path, state);
-
- free(name);
+ path = lilv_find_free_path(name.data, lilv_state_has_path, state);
} else {
// No link directory, preserve absolute path
path = lilv_strdup(abs_path);