From 70aa58f2c54d32ab12bda83bfaa092be97b80fb5 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sat, 16 Mar 2013 21:12:22 -0500 Subject: [PATCH 1/1] imagex.c: Fix use of uninitialized variable in error path --- programs/imagex.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/programs/imagex.c b/programs/imagex.c index f635e086..d6d26171 100644 --- a/programs/imagex.c +++ b/programs/imagex.c @@ -2124,14 +2124,14 @@ int main(int argc, char **argv) for_imagex_command(cmd) { if (strcmp(cmd->name, *argv) == 0) { ret = cmd->func(argc, argv); - goto out; + goto out_check_write_error; } } imagex_error("Unrecognized command: `%s'", argv[0]); usage_all(); return 1; -out: +out_check_write_error: /* For 'imagex info' and 'imagex dir', data printed to standard output * is part of the program's actual behavior and not just for * informational purposes, so we should set a failure exit status if @@ -2143,7 +2143,7 @@ out: ret = -1; } } - +out: /* Exit status (ret): -1 indicates an error found by 'imagex' outside * of the wimlib library code. 0 indicates success. > 0 indicates a * wimlib error code from which an error message can be printed. */ -- 2.43.0