test : fix minor issues 98/249598/1 accepted/tizen/unified/20201216.215923 submit/tizen/20201215.102704
authorKichan Kwon <k_c.kwon@samsung.com>
Tue, 15 Dec 2020 07:39:08 +0000 (16:39 +0900)
committerKichan Kwon <k_c.kwon@samsung.com>
Tue, 15 Dec 2020 08:01:10 +0000 (17:01 +0900)
- Set the initial value
- Use "free" for the memory allocated by "malloc"

Change-Id: I76d716f74942f6c2c2480ee50aa48596dbdba02d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
test/init_db/feature.cpp
test/init_db/util.cpp

index f9c8fb392ee2f2f0670b709d367d767ac9049605..f0c95612ae016fc73c253f5713af27c04b46d279 100644 (file)
@@ -270,7 +270,9 @@ int StringFeature::verifyValue(void)
        }
 
        ret = compareValue(std::string(output), value);
-       delete(output);
+
+       if (output)
+               free(output);
 
        return ret;
 }
index 472c1ef3b5ca810234275b14c2937e5ebb214211..d3897d089ced139ab0d0e110c72ca269e3fa3514 100644 (file)
@@ -199,7 +199,7 @@ clean:
 
 int Util::readModelConfig(void)
 {
-       int ret;
+       int ret = SUCCEED;
        xmlDocPtr doc = nullptr;
        xmlNodePtr nodeRoot = nullptr;
        xmlNodePtr nodeTag = nullptr;