diff options
| author | Roy Marples <roy@marples.name> | 2013-12-03 23:10:21 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2013-12-03 23:10:21 +0000 |
| commit | b7f5d1db5ba84809c9fb1d905ea428fc8f56ba0c (patch) | |
| tree | f4ae54ae6466674fe6a303b04e12a7f7ab1a54eb /dhcpcd.c | |
| parent | 034768814a3b3610b8168a586c1e6c86c8c79a05 (diff) | |
| download | dhcpcd-b7f5d1db5ba84809c9fb1d905ea428fc8f56ba0c.tar.xz | |
Fix a few memory leaks, DHCPv6 prefix definition and the -V option.
Diffstat (limited to 'dhcpcd.c')
| -rw-r--r-- | dhcpcd.c | 37 |
1 files changed, 22 insertions, 15 deletions
@@ -1155,21 +1155,8 @@ main(int argc, char **argv) i = 2; break; case 'V': - printf("Interface options:\n"); - if_printoptions(); -#ifdef INET - if (family == 0 || family == AF_INET) { - printf("\nDHCPv4 options:\n"); - dhcp_printoptions(); - } -#endif -#ifdef INET6 - if (family == 0 || family == AF_INET6) { - printf("\nDHCPv6 options:\n"); - dhcp6_printoptions(); - } -#endif - exit(EXIT_SUCCESS); + i = 3; + break; case '?': usage(); exit(EXIT_FAILURE); @@ -1185,6 +1172,26 @@ main(int argc, char **argv) usage(); exit(EXIT_FAILURE); } + if (i == 3) { + printf("Interface options:\n"); + if_printoptions(); +#ifdef INET + if (family == 0 || family == AF_INET) { + printf("\nDHCPv4 options:\n"); + dhcp_printoptions(); + } +#endif +#ifdef INET6 + if (family == 0 || family == AF_INET6) { + printf("\nDHCPv6 options:\n"); + dhcp6_printoptions(); + } +#endif +#ifdef DEBUG_MEMORY + cleanup(); +#endif + exit(EXIT_SUCCESS); + } options = if_options->options; if (i != 0) { if (i == 1) |
