From dc832e6eea0c53b99529f86ff71a905251ae2212 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 16 Feb 2016 12:59:43 +0100 Subject: [PATCH] pictureviewer.cpp fix possible memleak Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/93f3007be1f7734359cc9ba803f97116a06d0fd3 Author: Jacek Jendrzej Date: 2016-02-16 (Tue, 16 Feb 2016) --- src/driver/pictureviewer/pictureviewer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/driver/pictureviewer/pictureviewer.cpp b/src/driver/pictureviewer/pictureviewer.cpp index 17d07c89b..c13ce7251 100644 --- a/src/driver/pictureviewer/pictureviewer.cpp +++ b/src/driver/pictureviewer/pictureviewer.cpp @@ -446,6 +446,7 @@ void CPictureViewer::showBusy (int sx, int sy, int width, char r, char g, char b m_busy_buffer = (unsigned char *) malloc (width * width * cpp); if (m_busy_buffer == NULL) { dprintf(DEBUG_NORMAL, "[CPictureViewer] [%s - %d] Error: malloc\n", __func__, __LINE__); + cs_free_uncached (fb_buffer); return; } busy_buffer_wrk = m_busy_buffer;