Hi,

On Wed, 2011-10-12 at 16:19 +0300, Jukka Rissanen wrote:
> +       keyfile = connman_storage_load_service(ident);
> +       if (keyfile == NULL)
> +               return -EINVAL;
> +
> +       hex_duid = g_key_file_get_string(keyfile, ident, "IPv6.DHCP.DUID",
> +                                       NULL);
> +       if (hex_duid != NULL) {
> +               unsigned int i, j = 0, hex;
> +               size_t hex_duid_len = strlen(hex_duid);
> +
> +               duid = g_try_malloc0(hex_duid_len / 2);
> +               if (duid == NULL) {
> +                       g_free(hex_duid);
> +                       return -ENOMEM;

'keyfile' seems to be leaking memory on the above return,

> +       } else {
> +               int ret;
> +               int type = __connman_ipconfig_get_type_from_index(index);
> +
> +               ret = g_dhcpv6_create_duid(G_DHCPV6_DUID_LLT, index, type,
> +                                       &duid, &duid_len);
> +               if (ret < 0)
> +                       return ret;
> +
> +               hex_duid = convert_to_hex(duid, duid_len);
> +               if (hex_duid == NULL)
> +                       return -ENOMEM;

...same here.


Cheers,

        Patrik

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to