summaryrefslogtreecommitdiffstats
path: root/rfc1035/testlookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'rfc1035/testlookup.c')
-rw-r--r--rfc1035/testlookup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rfc1035/testlookup.c b/rfc1035/testlookup.c
index 869e806..29faafc 100644
--- a/rfc1035/testlookup.c
+++ b/rfc1035/testlookup.c
@@ -332,7 +332,7 @@ char ptrbuf[RFC1035_MAXNAMESIZE+1];
replyp=rfc1035_resolve(&res, RFC1035_OPCODE_QUERY,
q_name, q_type[0], q_class);
}
- free(q_type);
+
if (!replyp)
{
perror(argv[0]);
@@ -358,5 +358,6 @@ char ptrbuf[RFC1035_MAXNAMESIZE+1];
}
rfc1035_replyfree(replyp);
rfc1035_destroy_resolv(&res);
+ free(q_type);
return (0);
}