chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3cf148f
)
core: Forgot to dereference pointer when checking for NULL
author
Stefan Beller
<stefanbeller@googlemail.com>
Sun, 29 Dec 2013 23:18:39 +0000
(
00:18
+0100)
committer
Kay 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
patch
|
blob
|
history
diff --git
a/src/core/execute.c
b/src/core/execute.c
index 6ae9a5eb71ebb0c54816879cf3989d058c922fd9..7f93c0c3b1ebd8a0728e2a3bd85a7e57977b937c 100644
(file)
--- 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;