chiark / gitweb /
core: Forgot to dereference pointer when checking for NULL
authorStefan Beller <stefanbeller@googlemail.com>
Sun, 29 Dec 2013 23:18:39 +0000 (00:18 +0100)
committerKay Sievers <kay@vrfy.org>
Mon, 30 Dec 2013 15:23:13 +0000 (16:23 +0100)
Actually we already checked for !rt before, now we'd like to examine
the return value of the memory allocation.

src/core/execute.c

index 6ae9a5e..7f93c0c 100644 (file)
@@ -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;