libaurum: fix memory leak in takeScreenshot accepted/tizen_6.5_unified tizen_6.5 accepted/tizen/6.5/unified/20221209.123333 submit/tizen_6.5/20220512.102639 submit/tizen_6.5/20221207.045505
authorHosang Kim <hosang12.kim@samsung.com>
Thu, 12 May 2022 10:01:20 +0000 (19:01 +0900)
committerWoochanlee <wc0917.lee@samsung.com>
Thu, 12 May 2022 10:26:22 +0000 (19:26 +0900)
Change-Id: I0d98b8c1f665c94585b0e657774f04ee48fd69fa

libaurum/src/Impl/TizenDeviceImpl.cc

index 1040f5c..f8b7d42 100644 (file)
@@ -282,6 +282,7 @@ bool TizenDeviceImpl::takeScreenshot(std::string path, float scale, int quality)
         if (tbm_surface) {
             tdm_helper_dump_buffer(tbm_surface, path.c_str());
             sync();
+            tbm_surface_destroy(tbm_surface);
         } else {
             efl_util_screenshot_deinitialize(screenshot);
             return false;