chore: fix almost *ALL* warnings.
[lunaix-os.git] / lunaix-os / kernel / mm / valloc.c
index a744ed1aeb091ac94f0f7562eb02cb27925fbc07..b7557ae0e8ab9b1e88b427ff6ec0d50dcb66a36f 100644 (file)
@@ -95,6 +95,16 @@ vfree(void* ptr)
     __vfree(ptr, piles, CLASS_LEN(piles_names));
 }
 
+void
+vfree_safe(void* ptr)
+{
+    if (!ptr) {
+        return;
+    }
+
+    __vfree(ptr, piles, CLASS_LEN(piles_names));
+}
+
 void*
 valloc_dma(unsigned int size)
 {