Calling util_alloc_filename() explicitly with two NULL arguments in this way is a bit wasted, just copy the string with util_alloc_string_copy().