From d0924443ed4eef68f9cac6ac7cbda8fc4d63b31e Mon Sep 17 00:00:00 2001 From: Thomas Reufer Date: Tue, 20 Jan 2015 20:32:21 +0100 Subject: use VDR's MALLOC wrapper --- ovgosd.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ovgosd.c b/ovgosd.c index 8f4f69e..c9e3ecd 100644 --- a/ovgosd.c +++ b/ovgosd.c @@ -1116,8 +1116,7 @@ public: return; bool specialColors = ColorFg || ColorBg; - tColor *argb = (tColor*)malloc(Bitmap.Width() * Bitmap.Height() * - sizeof(tColor)); + tColor *argb = MALLOC(tColor, Bitmap.Width() * Bitmap.Height()); if (!argb) return; @@ -1141,8 +1140,7 @@ public: if (!Active()) return; - tColor *argb = (tColor*)malloc(Bitmap.Width() * Bitmap.Height() * - sizeof(tColor)); + tColor *argb = MALLOC(tColor, Bitmap.Width() * Bitmap.Height()); if (!argb) return; @@ -1200,8 +1198,7 @@ public: int len = Utf8StrLen(s); if (len) { - unsigned int *symbols = - (unsigned int*)malloc((len + 1) * sizeof(unsigned int)); + unsigned int *symbols = MALLOC(unsigned int, len + 1); if (!symbols) return; @@ -1279,7 +1276,7 @@ public: { int w = x2 - x1 + 1; int h = y2 - y1 + 1; - tColor *argb = (tColor*)malloc(w * h * sizeof(tColor)); + tColor *argb = MALLOC(tColor, w * h); if (!argb) return; -- cgit v1.2.3