From b140ed8c611d2e345fc70afc993495d1f31dc69a Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 27 Oct 2017 13:34:22 +0000 Subject: Added test case for dynamic buffers, fixed a problem. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10900 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/common/oslib/src/chfactory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'os/common/oslib/src') 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; } -- cgit v1.2.3