Fix N_SE-37518 issue tizen_2.1 accepted/tizen/20130520.101322 submit/tizen/20130517.045248 submit/tizen_2.1/20130514.055031
authorDongchul Lim <dc7.lim@samsung.com>
Mon, 6 May 2013 12:27:38 +0000 (21:27 +0900)
committerDongchul Lim <dc7.lim@samsung.com>
Mon, 6 May 2013 12:27:38 +0000 (21:27 +0900)
Already used call object id free when idle state

src/s_call.c

index 1e7f463ea9ce96a1d54c32d5ba840b14753d43b7..859e45e9240acab1ab1ce15621663c7badbe5c2c 100644 (file)
@@ -201,16 +201,12 @@ static gboolean _call_request_message(    CoreObject *o,
 static void _call_status_idle( TcorePlugin *p, CallObject *co )
 {
        struct tnoti_call_status_idle data;
+       CoreObject *o;
 
+       o = tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_CALL);
        dbg("call id [%d], call status [%d]", tcore_call_object_get_id(co), tcore_call_object_get_status(co));
 
        if ( tcore_call_object_get_status( co ) != TCORE_CALL_STATUS_IDLE ) {
-
-               CoreObject *o = 0;
-               //int id = 0;
-
-               o = tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_CALL);
-
                data.type = tcore_call_object_get_type( co );
                dbg("data.type : [%d]", data.type );
 
@@ -227,8 +223,8 @@ static void _call_status_idle( TcorePlugin *p, CallObject *co )
 
                tcore_call_object_free( o, co );
        } else {
-
-               dbg("[ error ] call object was not free");
+               dbg("call object was freed");
+               tcore_call_object_free(o, co);
        }
 }