From: rohit Date: Tue, 2 Feb 2021 13:31:16 +0000 (+0530) Subject: [NULL CHECK] : SVACE issue fix X-Git-Tag: submit/tizen/20210202.180140^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_6.5_unified;p=platform%2Fcore%2Flocation%2Fmaps-plugin-here.git [NULL CHECK] : SVACE issue fix Change-Id: I7d722337d245a7d9eb7b86e8bf26466dbc83c923 --- diff --git a/src/here_view_objects.cpp b/src/here_view_objects.cpp index 0938074..c137085 100644 --- a/src/here_view_objects.cpp +++ b/src/here_view_objects.cpp @@ -548,6 +548,10 @@ bool HereViewObjects::__resizeBitmap(unsigned char **curBmp, int curWidth, int c if (curWidth == newWidth && curHeight == newHeight) return false; unsigned char *newBmp = (unsigned char*)malloc(newWidth * newHeight * 4); + if(!newBmp) { + MAPS_LOGD("malloc failed for newBmp"); + return false; + } double scaleWidth = (double)newWidth / (double)curWidth; double scaleHeight = (double)newHeight / (double)curHeight;