From 68ac6478b40b2dfd07f3f5d79e27cf6346404d5d Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Mon, 27 Sep 2021 18:26:43 -0400 Subject: [PATCH] swtpm_setup: Fix exit code on error to be '1'. Signed-off-by: Stefan Berger --- src/swtpm_setup/swtpm_setup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/swtpm_setup/swtpm_setup.c b/src/swtpm_setup/swtpm_setup.c index 74cf694..0ab544f 100644 --- a/src/swtpm_setup/swtpm_setup.c +++ b/src/swtpm_setup/swtpm_setup.c @@ -1621,7 +1621,6 @@ int main(int argc, char *argv[]) tmpbuffer); out: -error: if (certsdir && g_rmdir(certsdir) != 0) logerr(gl_LOGFILE, "Could not remove temporary directory for certs: %s\n", strerror(errno)); @@ -1630,4 +1629,8 @@ error: g_free(gl_LOGFILE); exit(ret); + +error: + ret = 1; + goto out; }