From 1d3abd17cc011857e542d42185de49b455afc2d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Gr=C3=A4f?= Date: Fri, 7 Oct 2016 13:42:24 +0200 Subject: [PATCH] dma2d: fix an error in up_dma2dcreatelayer where an invalid pointer was returned when a certain underlying function failed. --- arch/arm/src/stm32/stm32_dma2d.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/src/stm32/stm32_dma2d.c b/arch/arm/src/stm32/stm32_dma2d.c index 5e5740e27b..db76245708 100644 --- a/arch/arm/src/stm32/stm32_dma2d.c +++ b/arch/arm/src/stm32/stm32_dma2d.c @@ -2069,6 +2069,7 @@ FAR struct dma2d_layer_s *up_dma2dcreatelayer(fb_coord_t width, /* free the layer struture */ kmm_free(layer); + layer = NULL; lcderr("ERROR: ENOMEM, Unable to allocate layer buffer\n"); errno = ENOMEM; }