[librsvg: 2/5] xml2_load.rs: Explicitly drop a Box::from_raw to free it




commit d8ae2eeb67448c1388a4d886d6c758fd00863044
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Jul 20 09:53:59 2022 -0500

    xml2_load.rs: Explicitly drop a Box::from_raw to free it
    
    Did this change in nightly?
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/723>

 src/xml/xml2_load.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/xml/xml2_load.rs b/src/xml/xml2_load.rs
index 93dfda064..22341db1a 100644
--- a/src/xml/xml2_load.rs
+++ b/src/xml/xml2_load.rs
@@ -377,7 +377,7 @@ unsafe extern "C" fn stream_ctx_close(context: *mut libc::c_void) -> libc::c_int
         }
     };
 
-    Box::from_raw(ctx);
+    drop(Box::from_raw(ctx));
 
     ret
 }


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