fix: fix memory corruption 69/273569/3
authorDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 8 Apr 2022 00:18:16 +0000 (09:18 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 11 Apr 2022 01:11:15 +0000 (10:11 +0900)
/home/abuild/rpmbuild/BUILD/capi-system-system-settings-0.0.5/tests/sst_gtest_normal_font.cpp:88: Failure
Expected equality of these values:
  SYSTEM_SETTINGS_ERROR_NONE
    Which is: 0
  ret
    Which is: -5
double free or corruption (out)
Aborted (core dumped)

Change-Id: If2e2e5f66fbe1289104160d745aeb3dc3fecbe1c

tests/sst_gtest_normal_font.cpp

index 7cb060b..4ced494 100644 (file)
@@ -76,7 +76,7 @@ TEST(SstFontTest, setFontSizeERR)
 }
 TEST(SstFontTest, getDefaultfont)
 {
-       char *val;
+       char *val = NULL;
        sst_interface *iface;
 
        sstm_system_info_get_platform_bool_setup(true);