glsl/cache: correct asprintf error handling
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 3 Nov 2016 09:23:17 +0000 (10:23 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 4 Nov 2016 09:28:08 +0000 (10:28 +0100)
commitaef7eb4cacbb241dc895f3e08dba4c91052a98a8
treeb5df99c8105711414533ef36a66bdba2d37cca1b
parent8ce7ef75f5d164bfe9eae23749e83b6a88e2b270
glsl/cache: correct asprintf error handling

From the manpage of asprintf:

   "If memory allocation wasn't possible, or some other error occurs,
    these functions will return -1, and the contents of strp are
    undefined."

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
src/compiler/glsl/cache.c