[PATCH 4/7] sna: assert a pointer is non-NULL before dereferencing it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Caught by Klockwork.

Signed-off-by: Martin Peres <martin.peres@xxxxxxxxxxxxxxx>
---
 src/sna/sna_accel.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 8ceb1e1..f1c136a 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -4376,6 +4376,7 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags)
 
 	if (priv->shm) {
 		assert(!priv->flush);
+		assert(priv->cpu_bo);
 		sna_add_flush_pixmap(sna, priv, priv->cpu_bo);
 	}
 
-- 
2.7.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux