From 07982ed1efcf7c1d3eee7fe15731e6bd24b5d176 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 22 Jan 2018 15:32:57 +0100 Subject: [PATCH] tmpfiles: add missing OOM check --- src/tmpfiles/tmpfiles.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index f96f400..d4a606f 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -2261,6 +2261,9 @@ static int parse_line(const char *fname, unsigned line, const char *buffer, bool } } else { existing = new0(ItemArray, 1); + if (!existing) + return log_oom(); + r = ordered_hashmap_put(h, i.path, existing); if (r < 0) return log_oom(); -- 2.7.4