From 348a25edbb87ee4e67aa79fcb97a2bc1b5c11c7b Mon Sep 17 00:00:00 2001 From: Lukas Nykryn Date: Wed, 19 Dec 2012 14:38:53 +0100 Subject: [PATCH] coredumpctl: check return of strndup --- src/journal/coredumpctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c index f9cebb7..4f0ed58 100644 --- a/src/journal/coredumpctl.c +++ b/src/journal/coredumpctl.c @@ -262,7 +262,7 @@ static int retrieve(const void *data, return 0; *var = strndup((const char*)data + ident, len - ident); - if (!var) + if (!*var) return log_oom(); return 0; -- 2.7.4