From 9d6c7ecefa9eab1312c9c83e49ffda9cd5a5093f Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 4 Dec 2018 10:45:27 +0100 Subject: [PATCH] add missing initialization for memory subsystem --- src/villas-pipe.cpp | 4 ++++ src/villas-signal.cpp | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/villas-pipe.cpp b/src/villas-pipe.cpp index a4bfd6f7e..85d4dfe3a 100644 --- a/src/villas-pipe.cpp +++ b/src/villas-pipe.cpp @@ -323,6 +323,10 @@ check: if (optarg == endptr) char *nodestr = argv[optind+1]; struct format_type *fmt; + ret = memory_init(0); + if (ret) + throw RuntimeError("Failed to intialize memory"); + ret = utils::signals_init(quit); if (ret) throw RuntimeError("Failed to initialize signals"); diff --git a/src/villas-signal.cpp b/src/villas-signal.cpp index 59b059a53..4837f166d 100644 --- a/src/villas-signal.cpp +++ b/src/villas-signal.cpp @@ -188,7 +188,9 @@ int main(int argc, char *argv[]) if (!ft) throw RuntimeError("Invalid output format '{}'", format); - memory_init(0); // Otherwise, ht->size in hash_table_hash() will be zero + ret = memory_init(0); + if (ret) + throw RuntimeError("Failed to initialize memory"); nt = node_type_lookup("signal"); if (!nt)