aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networking/nslookup.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/networking/nslookup.c b/networking/nslookup.c
index feeec15aa..92e07e8b1 100644
--- a/networking/nslookup.c
+++ b/networking/nslookup.c
@@ -797,11 +797,9 @@ int nslookup_main(int argc UNUSED_PARAM, char **argv)
char buf80[80];
ptr = make_ptr(buf80, *argv);
-
if (ptr) {
- add_query(&queries, &n_queries, T_PTR, ptr);
- }
- else {
+ add_query(&queries, &n_queries, T_PTR, xstrdup(ptr));
+ } else {
add_query(&queries, &n_queries, T_A, *argv);
#if ENABLE_FEATURE_IPV6
add_query(&queries, &n_queries, T_AAAA, *argv);