Hi Frédéric, 2011/10/20 Frédéric Danis <frederic.danis@xxxxxxxxxxxxxxx>: > + if (eir->name) > + g_free(eir->name); You don't need to check for NULL before passing a pointer to g_free(). IMHO just "g_free(eir->name)" is clearer. > + > + eir->name = g_strndup((char *) &eir_data[2], > field_len - 1); > - else > - eir->name = g_strdup(""); > eir->name_complete = eir_data[1] == EIR_NAME_COMPLETE; > break; 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