diff options
Diffstat (limited to 'lib/libc/asr/res_send.c')
-rw-r--r-- | lib/libc/asr/res_send.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/asr/res_send.c b/lib/libc/asr/res_send.c index 5135a8d15da..2353796a080 100644 --- a/lib/libc/asr/res_send.c +++ b/lib/libc/asr/res_send.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_send.c,v 1.3 2013/04/30 12:02:39 eric Exp $ */ +/* $OpenBSD: res_send.c,v 1.4 2013/05/27 17:31:01 eric Exp $ */ /* * Copyright (c) 2012 Eric Faurot <eric@openbsd.org> * @@ -31,6 +31,8 @@ res_send(const u_char *buf, int buflen, u_char *ans, int anslen) struct async_res ar; size_t len; + res_init(); + if (ans == NULL || anslen <= 0) { errno = EINVAL; return (-1); |