pan/midgard: Don't try to free NULL in LCRA
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 6 Dec 2019 21:49:26 +0000 (16:49 -0500)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 12 Dec 2019 16:42:07 +0000 (11:42 -0500)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 12e393bacf0 ("panfrost: add lcra_free() to free lcra state")
src/panfrost/midgard/lcra.c

index c6411b8c3797da9922aa4d9130ea0e841ed2dac9..a280a744b924e6924ec5a8c89a07e1088655ace0 100644 (file)
@@ -69,6 +69,9 @@ lcra_alloc_equations(
 void
 lcra_free(struct lcra_state *l)
 {
+        if (!l)
+                return;
+
         free(l->alignment);
         free(l->linear);
         free(l->modulus);