OSDN Git Service
(root)
/
uclinux-h8
/
uClibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7da4d1e
)
resolv: really fix res_close not to hang with ipv6
author
Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com>
Wed, 13 Apr 2011 17:38:40 +0000
(19:38 +0200)
committer
Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com>
Wed, 13 Apr 2011 17:38:40 +0000
(19:38 +0200)
Fix goof in previous commit.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
libc/inet/resolv.c
patch
|
blob
|
history
diff --git
a/libc/inet/resolv.c
b/libc/inet/resolv.c
index
05a1335
..
021d5bf
100644
(file)
--- a/
libc/inet/resolv.c
+++ b/
libc/inet/resolv.c
@@
-3008,8
+3008,8
@@
void res_close(void)
char *p1 = (char*) &(_res.nsaddr_list[0]);
int m = 0;
/* free nsaddrs[m] if they do not point to nsaddr_list[x] */
- while (m
++
< ARRAY_SIZE(_res._u._ext.nsaddrs)) {
- char *p2 = (char*)(_res._u._ext.nsaddrs[m]);
+ while (m < ARRAY_SIZE(_res._u._ext.nsaddrs)) {
+ char *p2 = (char*)(_res._u._ext.nsaddrs[m
++
]);
if (p2 < p1 || (p2 - p1) > sizeof(_res.nsaddr_list))
free(p2);
}