diff options
author | Vitaly Magerya <vmagerya@gmail.com> | 2011-03-22 20:14:26 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-03-22 20:14:26 +0100 |
commit | 7f4b769c42f3773ff2e2e749547291dcb7e85d01 (patch) | |
tree | 33680f1d1a6d182c2d78dd2158ee696528fea920 /networking | |
parent | cf9074b54bfb5a325ce59127b7afe1e892223a1c (diff) | |
download | busybox-w32-7f4b769c42f3773ff2e2e749547291dcb7e85d01.tar.gz busybox-w32-7f4b769c42f3773ff2e2e749547291dcb7e85d01.tar.bz2 busybox-w32-7f4b769c42f3773ff2e2e749547291dcb7e85d01.zip |
don't call freeaddinfo(NULL)
Signed-off-by: Vitaly Magerya <vmagerya@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r-- | networking/nslookup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/nslookup.c b/networking/nslookup.c index dcac7379e..67fc01547 100644 --- a/networking/nslookup.c +++ b/networking/nslookup.c | |||
@@ -66,7 +66,7 @@ static int print_host(const char *hostname, const char *header) | |||
66 | // hint.ai_flags = AI_CANONNAME; | 66 | // hint.ai_flags = AI_CANONNAME; |
67 | rc = getaddrinfo(hostname, NULL /*service*/, &hint, &result); | 67 | rc = getaddrinfo(hostname, NULL /*service*/, &hint, &result); |
68 | 68 | ||
69 | if (!rc) { | 69 | if (rc == 0) { |
70 | struct addrinfo *cur = result; | 70 | struct addrinfo *cur = result; |
71 | unsigned cnt = 0; | 71 | unsigned cnt = 0; |
72 | 72 | ||
@@ -94,7 +94,7 @@ static int print_host(const char *hostname, const char *header) | |||
94 | bb_error_msg("can't resolve '%s'", hostname); | 94 | bb_error_msg("can't resolve '%s'", hostname); |
95 | #endif | 95 | #endif |
96 | } | 96 | } |
97 | if (ENABLE_FEATURE_CLEAN_UP) | 97 | if (ENABLE_FEATURE_CLEAN_UP && result) |
98 | freeaddrinfo(result); | 98 | freeaddrinfo(result); |
99 | return (rc != 0); | 99 | return (rc != 0); |
100 | } | 100 | } |