From f146f5e159445c4fc7e89fe19ee2b8d72fc19ed7 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Mon, 30 Dec 2013 00:18:39 +0100 Subject: [PATCH] core: Forgot to dereference pointer when checking for NULL Actually we already checked for !rt before, now we'd like to examine the return value of the memory allocation. --- src/core/execute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/execute.c b/src/core/execute.c index 6ae9a5eb7..7f93c0c3b 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -2282,7 +2282,7 @@ static int exec_runtime_allocate(ExecRuntime **rt) { return 0; *rt = new0(ExecRuntime, 1); - if (!rt) + if (!*rt) return -ENOMEM; (*rt)->n_ref = 1; -- 2.30.2