We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac4d7b0 commit 498115fCopy full SHA for 498115f
1 file changed
Source/heap_5.c
@@ -110,6 +110,7 @@
110
*
111
*/
112
#include <stdlib.h>
113
+#include <string.h>
114
115
/* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining
116
all the API functions to use the MPU wrappers. That should only be done when
@@ -312,6 +313,12 @@ void *pvReturn = NULL;
312
313
}
314
#endif
315
316
+ /*
317
+ * Zero out returned block
318
+ */
319
+ if (pvReturn != NULL)
320
+ memset((void*)pvReturn, 0, xWantedSize - uxHeapStructSize);
321
+
322
return pvReturn;
323
324
/*-----------------------------------------------------------*/
0 commit comments