Module: Mesa Branch: master Commit: 5e8db898fd53b7622e21616f0ff27d985d7be758 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5e8db898fd53b7622e21616f0ff27d985d7be758
Author: Samuel Pitoiset <[email protected]> Date: Tue Feb 9 11:40:08 2016 +0100 st/mesa: check ureg_create() retval in create_pbo_upload_vs() This avoids a possible NULL dereference because ureg_create() might return a NULL pointer. Spotted by coverity. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> --- src/mesa/state_tracker/st_cb_texture.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index f2b607c..d53126a 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1132,6 +1132,8 @@ create_pbo_upload_vs(struct st_context *st) struct ureg_dst out_layer; ureg = ureg_create(TGSI_PROCESSOR_VERTEX); + if (!ureg) + return NULL; in_pos = ureg_DECL_vs_input(ureg, TGSI_SEMANTIC_POSITION); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
