chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
src: our lord is coverity
[elogind.git]
/
src
/
condition.c
diff --git
a/src/condition.c
b/src/condition.c
index 61812c25705cfec2ca6d6f0675921616b2d13790..b404b49c925eba8c92a6a97420d0829c148c6c3a 100644
(file)
--- a/
src/condition.c
+++ b/
src/condition.c
@@
-30,7
+30,9
@@
Condition* condition_new(ConditionType type, const char *parameter, bool trigger, bool negate) {
Condition *c;
- c = new0(Condition, 1);
+ if (!(c = new0(Condition, 1)))
+ return NULL;
+
c->type = type;
c->trigger = trigger;
c->negate = negate;