chiark / gitweb /
src: our lord is coverity
[elogind.git] / src / condition.c
index 61812c25705cfec2ca6d6f0675921616b2d13790..b404b49c925eba8c92a6a97420d0829c148c6c3a 100644 (file)
@@ -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;