[librsvg/wip/aruiz/rust-pixbuf-loader] pixbuf-lodear: use to_glib_full() instead of into_raw() to leak GError



commit cf6b25651fbb4b4c8abcab359b629a05de9a02b6
Author: Alberto Ruiz <aruiz redhat com>
Date:   Mon Aug 8 13:29:15 2022 +0100

    pixbuf-lodear: use to_glib_full() instead of into_raw() to leak GError

 gdk-pixbuf-loader/src/lib.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gdk-pixbuf-loader/src/lib.rs b/gdk-pixbuf-loader/src/lib.rs
index 383aa5eaf..839b79508 100644
--- a/gdk-pixbuf-loader/src/lib.rs
+++ b/gdk-pixbuf-loader/src/lib.rs
@@ -116,7 +116,7 @@ unsafe extern "C" fn stop_load(user_data: glib_sys::gpointer, error: *mut *mut G
         Ok(r) => r,
         Err(e) => {
             let gerr = glib::Error::new(gdk_pixbuf::PixbufError::Failed, &e);
-            *error = gerr.into_raw();
+            *error = gerr.to_glib_full() as *mut GError;
             return false.into_glib();
         }
     };


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