diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 40de59c18..2027b4101 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -2387,7 +2387,8 @@ LinphoneCore *linphone_core_new(const LinphoneCoreVTable *vtable, } LinphoneCore *linphone_core_ref(LinphoneCore *lc) { - return reinterpret_cast(belle_sip_object_ref(BELLE_SIP_OBJECT(lc))); + belle_sip_object_ref(BELLE_SIP_OBJECT(lc)); + return lc; } void linphone_core_unref(LinphoneCore *lc) {