diff --git a/modules/hw/mmal/vout.c b/modules/hw/mmal/vout.c
index 21ffbb35279e0ecee66ba87d4d92efe3e788d7c8..0fdbc6ce6f000334ccad4c851a795358f88a8b39 100644
--- a/modules/hw/mmal/vout.c
+++ b/modules/hw/mmal/vout.c
@@ -547,6 +547,13 @@ static picture_pool_t *vd_pool(vout_display_t *vd, unsigned count)
     }
 
 out:
+    if (!sys->picture_pool)
+    {
+        while(i-- != 0)
+            picture_Release(sys->pictures[i]);
+        free(sys->pictures);
+        sys->pictures = NULL;
+    }
     return sys->picture_pool;
 }