fix buffer leak when deiniting 36/170436/2
authorBoram Park <boram1288.park@samsung.com>
Tue, 20 Feb 2018 04:56:36 +0000 (13:56 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Tue, 20 Feb 2018 06:13:08 +0000 (06:13 +0000)
Change-Id: I7a742f011f0e75341f6a4d17140c2f0c184abc91

src/tdm.c
src/tdm_layer.c

index de6c179830244edcb8ca1f107cc433bf91195edc..33b27a74d141469d15dd38a434926f05d11c0ba3 100644 (file)
--- a/src/tdm.c
+++ b/src/tdm.c
@@ -137,6 +137,8 @@ _tdm_display_destroy_private_layer(tdm_private_layer *private_layer)
 
        LIST_DEL(&private_layer->link);
 
+       tdm_layer_unset_buffer_internal(private_layer);
+
        LIST_FOR_EACH_ENTRY_SAFE(c, cc, &private_layer->capture_list, link)
        tdm_capture_destroy_internal(c);
 
index 0ce567e08c4f877bca7e46f4528aef4fa1cf549f..9add05517499e7c1a099a48a9879039613290348 100644 (file)
@@ -555,6 +555,7 @@ tdm_layer_unset_buffer(tdm_layer *layer)
        _pthread_mutex_lock(&private_display->lock);
 
        ret = tdm_layer_unset_buffer_internal(private_layer);
+       TDM_WARNING_IF_FAIL(ret == TDM_ERROR_NONE);
 
        _pthread_mutex_unlock(&private_display->lock);