Fix SVACE defects 92/104492/1
authorSeungbae Shin <seungbae.shin@samsung.com>
Thu, 8 Dec 2016 04:26:37 +0000 (13:26 +0900)
committerJeongho Mok <jho.mok@samsung.com>
Tue, 13 Dec 2016 11:04:01 +0000 (03:04 -0800)
[Version] 5.0.100
[Profile] Common
[Issue Type] SVACE

Change-Id: I7d1ce86c7b16c79eb49f9fc8b9358741263785bc
(cherry picked from commit 3fb50e22f4d0527d03f2b37a093523ea23ccbffa)

packaging/pulseaudio-modules-tizen.spec
src/module-tizenaudio-policy.c
src/stream-manager-restriction.c
src/stream-manager-volume.c

index f6f921e..56e5768 100644 (file)
@@ -1,6 +1,6 @@
 Name:             pulseaudio-modules-tizen
 Summary:          Pulseaudio modules for Tizen
-Version:          5.0.99
+Version:          5.0.100
 Release:          0
 Group:            Multimedia/Audio
 License:          LGPL-2.1+
index 20c88f7..040f103 100644 (file)
@@ -567,7 +567,7 @@ static pa_hook_result_t select_proper_sink_or_source_hook_cb(pa_core *c, pa_stre
                                     }
                                     sink = (pa_sink*)pa_namereg_get(u->core, SINK_NAME_COMBINED_EX, PA_NAMEREG_SINK);
                                     PA_IDXSET_FOREACH(s, combine_sink_arg1->inputs, s_idx) {
-                                        if (s == data->stream) {
+                                        if (sink && s == data->stream) {
                                             pa_sink_input_move_to(s, sink, false);
                                             pa_log_info("  -- *** sink-input(%p,%u) moves to sink(%p,%s)", s, ((pa_sink_input*)s)->index, sink, sink->name);
                                             break;
index 432dd97..bdd8ecf 100644 (file)
@@ -39,7 +39,7 @@ int32_t handle_restrictions(pa_stream_manager *m, const char *name, uint32_t val
             m->restrictions.block_recording_media = true;
             PA_IDXSET_FOREACH(s, m->core->source_outputs, idx) {
                 role = pa_proplist_gets(GET_STREAM_PROPLIST(s, STREAM_SOURCE_OUTPUT), PA_PROP_MEDIA_ROLE);
-                if (pa_streq(role, "media")) {
+                if (pa_safe_streq(role, "media")) {
                     pa_log_info("  -- kill source-output(%p, %u)", s, ((pa_source_output*)s)->index);
                     pa_source_output_kill((pa_source_output*)s);
                 }
index dc74cf9..f28c388 100644 (file)
@@ -121,7 +121,7 @@ static int load_out_volume_conf_file(pa_stream_manager *m) {
             } else {
                 pa_log_warn("[%s] is not defined, skip it", key);
             }
-            free(key);
+            pa_xfree(key);
         } else {
             pa_log_error("failed to pa_xmalloc0()");
             ret = -1;
@@ -146,7 +146,7 @@ static int load_out_volume_conf_file(pa_stream_manager *m) {
             } else {
                 pa_log_warn("[%s] is not defined, skip it", key);
             }
-            free(key);
+            pa_xfree(key);
         } else {
             pa_log_error("failed to pa_xmalloc0()");
             ret = -1;