// something we don't understand
e_debug("EINA DEBUG ERROR: Unknown command");
}
+ /* Free the buffer only if the default dispatcher is used */
+ if (_session->dispatch_cb == eina_debug_dispatch)
+ free(buffer);
}
else if (size == 0)
{
{
Eina_Debug_Packet_Header *hdr = buffer;
Eina_Debug_Error ret = EINA_DEBUG_OK;
- if (hdr->thread_id == 0)
- {
- ret = _self_dispatch(session, buffer);
- free(buffer);
- return ret;
- }
+ if (hdr->thread_id == 0) return _self_dispatch(session, buffer);
else
{
int i, nb_calls = 0;
}
eina_spinlock_release(&_eina_debug_thread_lock);
}
- free(buffer);
}
return ret;
}