diff options
author | Adrian Szyndela <adrian.s@samsung.com> | 2020-12-15 08:32:00 +0100 |
---|---|---|
committer | Adrian Szyndela <adrian.s@samsung.com> | 2020-12-15 08:32:00 +0100 |
commit | 84f3818bb84e2f51e62f9ac596d1826439fe9a1f (patch) | |
tree | d668ca4b94ab0db29acfe1839744b5f7d96873b6 | |
parent | bd385559758373a7e0c320fb81e2fc1d4714e6dd (diff) | |
download | libdbuspolicy-84f3818bb84e2f51e62f9ac596d1826439fe9a1f.tar.gz libdbuspolicy-84f3818bb84e2f51e62f9ac596d1826439fe9a1f.tar.bz2 libdbuspolicy-84f3818bb84e2f51e62f9ac596d1826439fe9a1f.zip |
stest_performance: add some error checkingsubmit/tizen/20201215.075227accepted/tizen/unified/20201216.215918
Change-Id: I95f8ec6be9597d05d5ebb3a847f241d5cb9e8dc9
-rw-r--r-- | src/stest_performance.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/stest_performance.cpp b/src/stest_performance.cpp index bda50f8..410cbc7 100644 --- a/src/stest_performance.cpp +++ b/src/stest_performance.cpp @@ -213,8 +213,12 @@ void run_fb(const char *conf_file, const std::string &serialized, bool verify, s StorageBackendSerialized storage; if (serialized.empty()) { - size_t size; + size_t size = 0; auto buff = serializer.serialize(conf_file, size); + if (!buff) { + std::cerr << "Serialization failed" << std::endl; + return; + } storage.initFromData(buff, size, verify); } else { storage.init(serialized.c_str(), verify); |