shared/fileio: avoid copying strv twice

search_and_fopen called search_and_fopen_internal which made a copy
of the search strv and then called search_and_open which made a copy
too.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-09-01 15:57:58 +02:00
parent 98dbda7a2c
commit 6ec548c336
+1 -1
View File
@@ -1295,7 +1295,7 @@ static int search_and_fopen_internal(
assert(path);
assert(mode || !ret_file);
r = search_and_open(
r = search_and_open_internal(
path,
mode ? fopen_mode_to_flags(mode) : 0,
root,