diff options
author | sm26363 <none@none> | 2007-01-04 10:03:42 -0800 |
---|---|---|
committer | sm26363 <none@none> | 2007-01-04 10:03:42 -0800 |
commit | c16fc6609d9aa72229802524dc1d8c4ead6e9d2a (patch) | |
tree | c658f2b7f88ddae4c9c4b3a25bc5d852963192c2 /usr/src/lib/libresolv2/common/resolv/res_send.c | |
parent | 5600110389005ea5ace473e10a15c3e80a3edf97 (diff) | |
download | illumos-gate-c16fc6609d9aa72229802524dc1d8c4ead6e9d2a.tar.gz |
6248700 Memory leak in libresolv
6337595 core dump - res_nsend() always assumes statp->_u._ext.ext not being NULL
6340650 in.dhcpd: Must initialize statp structure before calling res_ninit()
6487719 libdhcpdu: Must initialize statp structure before calling res_ninit()
Diffstat (limited to 'usr/src/lib/libresolv2/common/resolv/res_send.c')
-rw-r--r-- | usr/src/lib/libresolv2/common/resolv/res_send.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/src/lib/libresolv2/common/resolv/res_send.c b/usr/src/lib/libresolv2/common/resolv/res_send.c index ba496dc333..5891e01e62 100644 --- a/usr/src/lib/libresolv2/common/resolv/res_send.c +++ b/usr/src/lib/libresolv2/common/resolv/res_send.c @@ -1,5 +1,5 @@ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -311,7 +311,8 @@ res_nsend(res_state statp, highestFD = sysconf(_SC_OPEN_MAX) - 1; #endif - if (statp->nscount == 0) { + /* No name servers or previous res_ninit() failure */ + if (statp->nscount == 0 || EXT(statp).ext == NULL) { errno = ESRCH; return (-1); } |