Merge branch 'tizen_3.0' into tizen 15/116915/1 accepted/tizen_common accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable accepted/tizen/4.0/unified/20170816.012123 accepted/tizen/common/20170303.090710 accepted/tizen/ivi/20170303.004801 accepted/tizen/mobile/20170303.004710 accepted/tizen/tv/20170303.004735 accepted/tizen/unified/20170309.033110 accepted/tizen/wearable/20170303.004746 submit/tizen/20170302.115149 submit/tizen_4.0/20170811.094300 submit/tizen_unified/20170308.100408 tizen_4.0.m1_release
authorSeungbae Shin <seungbae.shin@samsung.com>
Thu, 2 Mar 2017 03:50:14 +0000 (12:50 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Thu, 2 Mar 2017 03:50:17 +0000 (12:50 +0900)
Change-Id: I38ddafecb4f297600f67fb39cfcf68469b4e0651

mm_session.c
packaging/libmm-session.spec

index 6efb5a7..69d3ec7 100644 (file)
@@ -28,7 +28,6 @@
 #include <mm_error.h>
 #include <mm_debug.h>
 #include <errno.h>
-#include <glib.h>
 #include <pthread.h>
 #include <signal.h>
 
@@ -466,7 +465,7 @@ int _mm_session_util_read_information(int app_pid, int *session_type, int *flags
 
 void __session_signal_handler(int signo)
 {
-       char* filename = NULL;
+       char filename[MAX_FILE_LENGTH];
        char str_error[256];
 
        debug_warning("ENTER, sig.num(%d)", signo);
@@ -476,16 +475,14 @@ void __session_signal_handler(int signo)
        sigfillset(&all_mask);
        sigprocmask(SIG_BLOCK, &all_mask, &old_mask);
 
-       filename = g_strdup_printf("/tmp/mm_session_%d", getpid());
+       snprintf(filename, sizeof(filename) - 1, "/tmp/mm_session_%d", getpid());
        if (!remove(filename)) {
                debug_log(" remove %s success\n", filename);
        } else {
-               strerror_r (errno, str_error, sizeof (str_error));
+               strerror_r(errno, str_error, sizeof(str_error));
                debug_error(" remove %s failed with %s\n", filename, str_error);
        }
 
-       g_free(filename);
-
        sigprocmask(SIG_SETMASK, &old_mask, NULL);
        /* signal unblock ------------ */
 
index b1935f5..375bdda 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-session
 Summary:    Multimedia Session Library
-Version:    0.2.9
+Version:    0.2.10
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0