On Thu, Sep 22, 2016 at 11:45:06 +0300, Eric Anholt wrote:
> + asprintf(&displayfd_string, "%d", displayfd);
> + if (!displayfd_string)
> + exit(1);
I think you need to check the return value from asprintf, not
displayfd_string:
When successful, these functions return the number of bytes printed,
just like sprintf(3). If memory allocation wasn't possible, or some
other error occurs, these functions will return -1, and the contents of
strp are undefined.
Cheers,
Julien
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel