From 6a2d49f37a18c425248f382ba224e647344b6f1e Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 4 Feb 2015 15:15:12 +1000 Subject: [PATCH] renderer: check detach_iov interface check the return values aren't NULL --- src/vrend_renderer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index a3c8c38..f2185f5 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -3307,8 +3307,10 @@ void vrend_renderer_resource_detach_iov(int res_handle, if (!res) { return; } - *iov_p = res->iov; - *num_iovs_p = res->num_iovs; + if (iov_p) + *iov_p = res->iov; + if (num_iovs_p) + *num_iovs_p = res->num_iovs; res->iov = NULL; res->num_iovs = 0;