minui: fix mem leakage issue
Use free to release GRSurface object will not call data_'s
DataDeleter, then the buf data_ points to will leakage.
Use delete release GRSurface object.
Test: manual
Change-Id: I53a9ea5a4ad67de1662c707a5ea59d738bd9c2d8
Signed-off-by: lijiazi <lijiazi@xiaomi.com>
diff --git a/minui/resources.cpp b/minui/resources.cpp
index f635acd..d7b9277 100644
--- a/minui/resources.cpp
+++ b/minui/resources.cpp
@@ -450,5 +450,5 @@
}
void res_free_surface(GRSurface* surface) {
- free(surface);
+ delete(surface);
}