From 5c80753afb4abc2b5b024f4a5f2fc78669bda70b Mon Sep 17 00:00:00 2001 From: Klaus Wenninger Date: Mon, 15 Apr 2019 17:39:12 +0200 Subject: [PATCH] Sanity: sbd-inquisitor: free timeout action on bail out --- src/sbd-inquisitor.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sbd-inquisitor.c b/src/sbd-inquisitor.c index 77c6e4f..715e978 100644 --- a/src/sbd-inquisitor.c +++ b/src/sbd-inquisitor.c @@ -1088,7 +1088,8 @@ int main(int argc, char **argv, char **envp) break; case 'h': usage(); - return (0); + goto out; + break; default: exit_status = -2; goto out; @@ -1241,6 +1242,9 @@ int main(int argc, char **argv, char **envp) } out: + if (timeout_action) { + free(timeout_action); + } if (exit_status < 0) { if (exit_status == -2) { usage(); -- 1.8.3.1