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
