Hi Marcel, On Thu, Jul 7, 2011 at 4:35 AM, Marcel Holtmann <marcel@xxxxxxxxxxxx> wrote: >> + n->data = g_malloc0(sizeof(*orig) + orig->dlen); >> + memcpy(n->data, orig, sizeof(*orig) + orig->dlen); > > you don't need to add a memset via g_malloc0 here. And do we really not > wanna check the memory allocation here? What about using g_memdup() ? it does the equivalent of both calls. Unfortunately, there is no "g_try_memdup"... Regards, -- Anderson Lizardo Instituto Nokia de Tecnologia - INdT Manaus - Brazil -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html