Reduce the predefined logic (PredefinedPreprocessor)
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-otp.c
index 7d7a7f0..3a27e2a 100644 (file)
@@ -217,7 +217,7 @@ static const gchar otc_connection_xml[] =
 "  </interface>"
 "</node>";
 
-GDBusNodeInfo *otp_node_info = NULL;
+static GDBusNodeInfo *otp_node_info = NULL;
 static GDBusConnection *g_conn;
 static guint g_owner_id = 0;
 
@@ -274,6 +274,9 @@ static void __new_connection_method(GDBusConnection *connection,
                                        event_info->user_data);
                }
 
+               g_free(otc_info->address);
+               g_free(otc_info);
+
                g_dbus_method_invocation_return_value(invocation, NULL);
        }
 }