Fix unchecked return value 09/178409/2 accepted/tizen/unified/20180511.073905 submit/tizen/20180510.054548
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 10 May 2018 02:35:26 +0000 (11:35 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 10 May 2018 03:30:49 +0000 (12:30 +0900)
[Version] 0.12.18
[Issue Type] Coverity (CID 118319)

Change-Id: I04aa31259c6a7f6d433ee91517d8aa9adf591148
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/libmm-sound.spec
server/plugin/wav/mm_sound_plugin_codec_wave.c

index af47ece0312496b13283495b17781a852a7f3fef..5ffa215e7a677481eb647207e01ed9bfa289233e 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-sound
 Summary:    MMSound Package contains client lib and sound_server binary
-Version:    0.12.17
+Version:    0.12.18
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index 2b9ccf6aa88a6d434922e2f57f6bf02dc8b3df7b..f3eea7f5fb37459f3340a0304cae70086861a6fd 100644 (file)
@@ -374,6 +374,7 @@ error_context_new:
 
 static int _pa_stream_connect(wave_info_t *h)
 {
+       int ret = PA_OK;
        pa_stream *s = NULL;
        pa_proplist *proplist = NULL;
        pa_stream_state_t state;
@@ -400,9 +401,13 @@ static int _pa_stream_connect(wave_info_t *h)
        pa_stream_set_underflow_callback(s, _pa_stream_underflow_callback, h);
        pa_stream_set_buffer_attr_callback(s, _pa_stream_buffer_attr_callback, h);
 
-       pa_stream_connect_playback(s, NULL, NULL,
+       ret = pa_stream_connect_playback(s, NULL, NULL,
                                                        PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_ADJUST_LATENCY | PA_STREAM_AUTO_TIMING_UPDATE,
                                                        NULL, NULL);
+       if (ret < 0) {
+               debug_error("failed to pa_stream_connect_playback(), ret(%d)", ret);
+               goto error;
+       }
        for (;;) {
                state = pa_stream_get_state(s);