From 89b9a68e5fe56b863e01e6f39102d9ca0a54a88e Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Mon, 3 Nov 2025 22:06:53 +0100 Subject: [PATCH] sd-json: accept NULL path in sd_json_parse_file_at() too --- src/libsystemd/sd-json/sd-json.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libsystemd/sd-json/sd-json.c b/src/libsystemd/sd-json/sd-json.c index 776df25b8e7..c2da6bca07c 100644 --- a/src/libsystemd/sd-json/sd-json.c +++ b/src/libsystemd/sd-json/sd-json.c @@ -3453,10 +3453,8 @@ _public_ int sd_json_parse_file_at( if (f) r = read_full_stream(f, &text, NULL); - else if (path) - r = read_full_file_full(dir_fd, path, UINT64_MAX, SIZE_MAX, 0, NULL, &text, NULL); else - return -EINVAL; + r = read_full_file_full(dir_fd, path, UINT64_MAX, SIZE_MAX, 0, NULL, &text, NULL); if (r < 0) return r; -- 2.47.3