diff options
author | 2017-03-14 15:15:19 +0000 | |
---|---|---|
committer | 2017-03-14 15:15:19 +0000 | |
commit | f9bcbebd7b89d7af6cbba20dcd60dacc71d5216c (patch) | |
tree | adfa095c6cc2b353acb2cc5a573a3a6a9b3303f1 /lib/libc/asr/res_send_async.c | |
parent | Make mfc_find() more strict when looking for routes, fixes a problem (diff) | |
download | wireguard-openbsd-f9bcbebd7b89d7af6cbba20dcd60dacc71d5216c.tar.xz wireguard-openbsd-f9bcbebd7b89d7af6cbba20dcd60dacc71d5216c.zip |
don't need to handle the malloc case special, since realloc works
with NULL
ok eric
Diffstat (limited to 'lib/libc/asr/res_send_async.c')
-rw-r--r-- | lib/libc/asr/res_send_async.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/libc/asr/res_send_async.c b/lib/libc/asr/res_send_async.c index 3d4fa1a2277..3c3dd722e2b 100644 --- a/lib/libc/asr/res_send_async.c +++ b/lib/libc/asr/res_send_async.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_send_async.c,v 1.34 2017/02/27 11:38:08 jca Exp $ */ +/* $OpenBSD: res_send_async.c,v 1.35 2017/03/14 15:15:19 deraadt Exp $ */ /* * Copyright (c) 2012 Eric Faurot <eric@openbsd.org> * @@ -645,14 +645,6 @@ ensure_ibuf(struct asr_query *as, size_t n) { char *t; - if (as->as.dns.ibuf == NULL) { - as->as.dns.ibuf = malloc(n); - if (as->as.dns.ibuf == NULL) - return (-1); /* errno set */ - as->as.dns.ibufsize = n; - return (0); - } - if (as->as.dns.ibufsize >= n) return (0); |