tizenwlsink : Add exception handling for flush_buffer 91/163191/1 accepted/tizen/unified/20171211.061352 submit/tizen/20171208.044417
authorHyunil <hyunil46.park@samsung.com>
Fri, 8 Dec 2017 01:27:42 +0000 (10:27 +0900)
committerHyunil <hyunil46.park@samsung.com>
Fri, 8 Dec 2017 01:27:42 +0000 (10:27 +0900)
Change-Id: I9ab05d493c102214a7e63bcde27e7b932c9aade0
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
tizenwlsink/src/gsttizenwlsink.c

index a060806..6d34573 100644 (file)
@@ -705,6 +705,7 @@ gst_tizen_wl_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);
@@ -724,7 +725,8 @@ gst_tizen_wl_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);