waylandsink : fix coverity issue 20/163220/1 accepted/tizen/unified/20171212.171917 submit/tizen/20171212.053432
authorHyunil <hyunil46.park@samsung.com>
Fri, 8 Dec 2017 04:49:51 +0000 (13:49 +0900)
committerHyunil <hyunil46.park@samsung.com>
Fri, 8 Dec 2017 04:49:51 +0000 (13:49 +0900)
Change-Id: Iabd91d1c0d8ede93f3a3674b797f3c7a9443b7c7
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
ext/wayland/gstwaylandsink.c

index 2f8d914..ee4c6ef 100755 (executable)
@@ -699,6 +699,7 @@ gst_wayland_sink_make_flush_buffer (GstWlDisplay * display,
         strerror_r (errno, err_str, sizeof (err_str));
         GST_ERROR ("alloc tbm bo(size:%d) failed: %s(%d)", bo_size, err_str,
             errno);
+        g_free (flush_buffer);
         return FALSE;
       }
       GST_LOG ("flush buffer tbm_bo =(%p)", bo);
@@ -718,7 +719,8 @@ gst_wayland_sink_make_flush_buffer (GstWlDisplay * display,
           tbm_bo_unmap (mm_video_buf->handle.bo[i]);
         if (dst.ptr)
           tbm_bo_unmap (bo);
-        return FALSE;
+        g_free (flush_buffer);
+       return FALSE;
       }
       /* copy */
       memcpy (dst.ptr, src.ptr, bo_size);