On Tue, 2014-12-16 at 22:27 -0800, Vinson Lee wrote: > Fixes "Use after free" defect reported by Coverity. > > Signed-off-by: Vinson Lee <v...@freedesktop.org> > --- > tests/cl/api/get-platform-ids.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tests/cl/api/get-platform-ids.c b/tests/cl/api/get-platform-ids.c > index 6cc734a..ab3e4cd 100644 > --- a/tests/cl/api/get-platform-ids.c > +++ b/tests/cl/api/get-platform-ids.c > @@ -80,6 +80,7 @@ piglit_cl_test(const int argc, > piglit_merge_result(&result, PIGLIT_FAIL); > } > free(platforms); > + platforms = NULL;
The next test relies on the fact that platforms is not NULL. Maybe we can use something like (void*)-1 instead of freed pointer. > } > } > -- Jan Vesely <jan.ves...@rutgers.edu>
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit