On 09/10/15 03:56, Konrad Rzeszutek Wilk wrote:
> +    rc = xc_version_len(ctx->xch, XENVER_build_id, &u.build_id, 
> BUILD_ID_LEN);
> +    if (rc > 0) {
> +        unsigned int i;
> +
> +        info->build_id = (char *)malloc((rc * 2) + 1);
> +
> +        for (i = 0; i < rc && (i + 1) * 2 < BUILD_ID_LEN; i++)
> +            snprintf(&info->build_id[i * 2], 3, "%02hhx", u.build_id[i]);
> +
> +        info->build_id[i*2]='\0';
> +    } else
> +        info->build_id = strdup("");

info->build_id is unconditionally leaked, given this patch.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to