qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 3/8] egl-helpers: add functions for render nodes


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PULL 3/8] egl-helpers: add functions for render nodes and dma-buf passing
Date: Wed, 2 Mar 2016 15:14:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0


On 23/02/2016 15:24, Gerd Hoffmann wrote:
> +        if (strncmp(e->d_name, "renderD", 7)) {
> +            continue;
> +        }
> +
> +        r = asprintf(&p, "/dev/dri/%s", e->d_name);
> +        if (r < 0) {
> +            return -1;
> +        }

This leaks "dir" (due to skipping the closedir call).  Easier to just
use g_strdup_printf which ignores the possibility of a malloc failure.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]