aboutsummaryrefslogtreecommitdiffstats
path: root/os/common/oslib/src/chfactory.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/common/oslib/src/chfactory.c')
-rw-r--r--os/common/oslib/src/chfactory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/common/oslib/src/chfactory.c b/os/common/oslib/src/chfactory.c
index 687eec393..74e80e528 100644
--- a/os/common/oslib/src/chfactory.c
+++ b/os/common/oslib/src/chfactory.c
@@ -138,7 +138,7 @@ static dyn_element_t *dyn_create_object_heap(const char *name,
/* Allocating space for the new buffer object.*/
dep = (dyn_element_t *)chHeapAlloc(NULL, size);
- if (dep) {
+ if (dep == NULL) {
return NULL;
}