summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Moscicki <m.moscicki2@partner.samsung.com>2019-10-21 14:26:34 (GMT)
committerMateusz Moscicki <m.moscicki2@partner.samsung.com>2019-10-21 14:29:55 (GMT)
commit9c7f3bed10e7d52c4800b8248f335d2cfb78199c (patch)
tree9ed768320ea5e4cc98f07295c22f824459122c8e
parentca9c3174b9aecbbeaf0df1f6bcce230fdcfba2ad (diff)
downloadcrash-worker-9c7f3bed10e7d52c4800b8248f335d2cfb78199c.zip
crash-worker-9c7f3bed10e7d52c4800b8248f335d2cfb78199c.tar.gz
crash-worker-9c7f3bed10e7d52c4800b8248f335d2cfb78199c.tar.bz2
This release brings: - Fix memory leak Change-Id: Ida144b8ca6bd3f5ca954ef8478545f3dfff293e0
-rw-r--r--packaging/crash-worker.spec2
-rw-r--r--packaging/crash-worker_system-tests.spec2
-rw-r--r--src/livedumper/core.hpp3
3 files changed, 5 insertions, 2 deletions
diff --git a/packaging/crash-worker.spec b/packaging/crash-worker.spec
index e4d58a0..41fe249 100644
--- a/packaging/crash-worker.spec
+++ b/packaging/crash-worker.spec
@@ -13,7 +13,7 @@
Name: crash-worker
Summary: Crash-manager
-Version: 5.5.25
+Version: 5.5.26
Release: 1
Group: Framework/system
License: Apache-2.0 and BSD
diff --git a/packaging/crash-worker_system-tests.spec b/packaging/crash-worker_system-tests.spec
index 163c147..f289f5e 100644
--- a/packaging/crash-worker_system-tests.spec
+++ b/packaging/crash-worker_system-tests.spec
@@ -8,7 +8,7 @@
Name: crash-worker_system-tests
Summary: Package with binaries and scripts for crash-worker system tests
-Version: 5.5.25
+Version: 5.5.26
Release: 1
Group: Framework/system
License: Apache-2.0 and BSD
diff --git a/src/livedumper/core.hpp b/src/livedumper/core.hpp
index 2e4a8c4..e9ae8dc 100644
--- a/src/livedumper/core.hpp
+++ b/src/livedumper/core.hpp
@@ -308,6 +308,9 @@ class Core {
sym_data->data = elf_getdata(scn, nullptr);
if (sym_data->shdr.sh_entsize == 0) {
logger.log_info("sh_entsize is zero for %s", lib.c_str());
+ elf_end(sym_data->elf);
+ close(sym_data->fd);
+ delete sym_data;
return nullptr;
}
sym_data->count = sym_data->shdr.sh_size / sym_data->shdr.sh_entsize;