Added a NULL check 88/251788/1 accepted/tizen/unified/20210203.145459 submit/tizen/20210203.052936
authorLohit Agarwalla <l.agarwalla@samsung.com>
Tue, 19 Jan 2021 09:37:56 +0000 (15:07 +0530)
committerLohit Agarwalla <l.agarwalla@samsung.com>
Tue, 19 Jan 2021 09:37:56 +0000 (15:07 +0530)
Change-Id: I86be8f06a5354b8e933107774b04e15687217151
Signed-off-by: Lohit Agarwalla <l.agarwalla@samsung.com>
common/uiutil/src/AcUiAdaptor.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index a79ab68..233873b
@@ -72,6 +72,10 @@ AcUiAdaptor::convertVectorToCharArray(const std::vector<std::string>& stringVec)
        RET_IF_FAIL(vecSize > 0, NULL);
 
        const char **charArray = NALLOC(vecSize, const char*);
+       if(charArray == NULL) {
+               _ERR("memory allocation failed");
+               return NULL;
+       }
        for (int i = 0; i < vecSize; i++) {
                std::string ipStr = stringVec.at(i);
                int ipStrLen = ipStr.length();