psppire-output-view: Fix memory leaks.
[pspp] / src / output / cairo.c
index e7fc7f931ecc2365e421abababad2361825dd249..1c03db84fb39b7f7db8271c8033a676b9bba3eed 100644 (file)
@@ -1297,6 +1297,17 @@ xr_rendering_create (struct xr_driver *xr, const struct output_item *item,
   return r;
 }
 
+void
+xr_rendering_destroy (struct xr_rendering *r)
+{
+  if (r)
+    {
+      output_item_unref (r->item);
+      render_page_unref (r->page);
+      free (r);
+    }
+}
+
 void
 xr_rendering_measure (struct xr_rendering *r, int *w, int *h)
 {