nspawn: add two missing OOM checks

This commit is contained in:
Lennart Poettering 2018-08-02 17:57:56 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent 8dfce114ab
commit 8967f29169
1 changed files with 5 additions and 0 deletions

View File

@ -1779,7 +1779,12 @@ static int copy_devnodes(const char *dest) {
struct stat st;
from = strappend("/dev/", d);
if (!from)
return log_oom();
to = prefix_root(dest, from);
if (!to)
return log_oom();
if (stat(from, &st) < 0) {