move va_copy for unexpected return without va_end 51/103351/2 accepted/tizen/common/20161214.160347 accepted/tizen/ivi/20161214.015254 accepted/tizen/mobile/20161214.014700 accepted/tizen/tv/20161214.015119 accepted/tizen/wearable/20161214.015206 submit/tizen/20161213.083228
authorSeokHoon Lee <andy.shlee@samsung.com>
Thu, 8 Dec 2016 06:06:38 +0000 (15:06 +0900)
committerSeokHoon Lee <andy.shlee@samsung.com>
Fri, 9 Dec 2016 00:38:38 +0000 (09:38 +0900)
[Version] 0.0.11
[Profile] Common
[Issue Type] Bug fix
[Dependency module] N/A
[Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-3.0-mobile_20161130.2]

Signed-off-by: SeokHoon Lee <andy.shlee@samsung.com>
Change-Id: I7999c4279d29823ab0404226da5ce148e4e19583

packaging/libmm-streamrecorder.spec
src/mm_streamrecorder_attribute.c

index f850b96..f63eaf5 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-streamrecorder
 Summary:    Media Stream Recorder library
-Version:    0.0.10
+Version:    0.0.11
 Release:    0
 Group:      Multimedia/Other
 License:    Apache-2.0
index 6db79d1..e908d0f 100644 (file)
@@ -864,15 +864,15 @@ int _mmstreamrecorder_set_attributes(MMHandleType handle, char **err_attr_name,
 
        mmf_return_val_if_fail(handle, MM_ERROR_STREAMRECORDER_INVALID_ARGUMENT);
 
-       /* copy var_args to keep original var_args */
-       va_copy(var_args_copy, var_args);
-
        attrs = MMF_STREAMRECORDER_ATTRS(handle);
        if (!attrs) {
                _mmstreamrec_dbg_err("handle 0x%x, attrs is NULL, attr name [%s]", handle, attribute_name);
                return MM_ERROR_STREAMRECORDER_NOT_INITIALIZED;
        }
 
+       /* copy var_args to keep original var_args */
+       va_copy(var_args_copy, var_args);
+
        ret = __mmstreamrecorder_check_valid_pair(handle, err_attr_name, attribute_name, var_args);
 
        _mmstreamrec_dbg_err("__mmstreamrecorder_check_valid_pair handle 0x%x, attr name [%s] , ret = %d", handle, attribute_name, ret);