Fix Coverity issues in Bluetooth-frwk
[platform/core/connectivity/bluetooth-frwk.git] / bt-service-adaptation / services / obex / bt-service-map-client.c
index 08f0295..15c0e85 100644 (file)
@@ -658,7 +658,8 @@ int _bt_map_client_push_message(
                }
        }
 
-       g_object_unref(message_access_proxy);
+       if (message_access_proxy)
+               g_object_unref(message_access_proxy);
        BT_DBG("-");
 
        return result;
@@ -756,7 +757,8 @@ int _bt_map_client_get_message(
                }
        }
 
-       g_object_unref(message_proxy);
+       if (message_proxy)
+               g_object_unref(message_proxy);
        BT_DBG("-");
 
        return result;