diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-04-12 15:43:23 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-04-12 17:09:21 +0200 |
commit | 0ac6cdd6aeae23fff751e5292e3011be44f64c48 (patch) | |
tree | 2a858114b1551e0b00aab62bdcbb60ac2dd90fdb /src/basic/chase-symlinks.c | |
parent | chase-symlinks: use empty_to_root() where appropriate (diff) | |
download | systemd-0ac6cdd6aeae23fff751e5292e3011be44f64c48.tar.xz systemd-0ac6cdd6aeae23fff751e5292e3011be44f64c48.zip |
chase-symlinks: add missing OOM check
Diffstat (limited to 'src/basic/chase-symlinks.c')
-rw-r--r-- | src/basic/chase-symlinks.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/chase-symlinks.c b/src/basic/chase-symlinks.c index 63d3e44913..eff5785a29 100644 --- a/src/basic/chase-symlinks.c +++ b/src/basic/chase-symlinks.c @@ -203,6 +203,8 @@ int chase_symlinks( todo = buffer; done = strdup("/"); } + if (!done) + return -ENOMEM; for (;;) { _cleanup_free_ char *first = NULL; |