[systemd-commits] src/core

Kay Sievers kay at kemper.freedesktop.org
Mon Dec 30 07:41:18 PST 2013


 src/core/execute.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f146f5e159445c4fc7e89fe19ee2b8d72fc19ed7
Author: Stefan Beller <stefanbeller at googlemail.com>
Date:   Mon Dec 30 00:18:39 2013 +0100

    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.

diff --git a/src/core/execute.c b/src/core/execute.c
index 6ae9a5e..7f93c0c 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;



More information about the systemd-commits mailing list