main() dinamically allocates dcb, but when dcb_help() is called it
returns without freeing it.
Fix this using a goto, as it is already done in the same function.
Fixes: 67033d1c1c8a ("Add skeleton of a new tool, dcb")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Reviewed-by: Petr Machata <me@pmachata.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
break;
case 'h':
dcb_help();
- return 0;
+ ret = EXIT_SUCCESS;
+ goto dcb_free;
default:
fprintf(stderr, "Unknown option.\n");
dcb_help();