From ce959f477ebc28af30a35aaa3ac2652fa520728a Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Sat, 8 Oct 2022 16:38:57 +0900 Subject: [PATCH] utils/ipc-ssltunnel: Initialize global variables In ipc-ssltunnel, global variables are used to store the topics and hooks that are passed to ipc-tap and ipc-inject. These variables are declared in main(), however not all of them are initialized. While this is not a bug, the function should either initialize all of the arrays or none at all. This commit modifies ipc-ssltunnel to initialize all of the arrays in main(). --- utils/ipc-sshtunnel.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/ipc-sshtunnel.sh b/utils/ipc-sshtunnel.sh index 3d365f9..74e34fa 100755 --- a/utils/ipc-sshtunnel.sh +++ b/utils/ipc-sshtunnel.sh @@ -120,7 +120,9 @@ main() { local remote input_topics=() - output_topics=() + output_topics=() + tap_hooks=() + inject_hooks=() opt_add_arg "i" "input-topic" "v" "" "Topic to relay from the remote side (may be used more than once)" \ "" _array_add -- 2.47.3