fix coverity 04/178404/2 accepted/tizen/unified/20180510.070924 submit/tizen/20180510.034843
authorsangho park <sangho.g.park@samsung.com>
Thu, 10 May 2018 02:18:59 +0000 (11:18 +0900)
committersangho park <sangho.g.park@samsung.com>
Thu, 10 May 2018 02:20:28 +0000 (11:20 +0900)
CID-110342 Resource leak

Change-Id: If8c0ea85c19f4bc251e798e6fb11eedb417144b7
Signed-off-by: sangho park <sangho.g.park@samsung.com>
packaging/capi-media-vision.spec
test/testsuites/surveillance/surveillance_test_suite.c

index 5d73ca5c4a87d049c00744fb0389ad74f2a63eea..a66512bec8bd87f2333501110af1aa5a325b71ab 100644 (file)
@@ -1,6 +1,6 @@
 Name:        capi-media-vision
 Summary:     Media Vision library for Tizen Native API
-Version:     0.3.29
+Version:     0.3.30
 Release:     1
 Group:       Multimedia/Framework
 License:     Apache-2.0 and BSD-3-Clause
index 82373e2f5bdee437a70208dda89fde5f6d6a2d77..5d80753159b9676a622d99df1d541c5d66542eeb 100644 (file)
@@ -596,6 +596,10 @@ void push_source()
        error = mv_surveillance_push_source(source, video_stream_id);
        if (MEDIA_VISION_ERROR_NONE != error) {
                PRINT_E("Errors were occurred during source pushing, code %i", error);
+               int error2 = mv_destroy_source(source);
+               if (MEDIA_VISION_ERROR_NONE != error2) {
+                       PRINT_E("Errors were occurred during source destroying, code %i", error2);
+               }
                return;
        }