summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-03-19 05:35:06 +0000
committerTim Potter <tpot@samba.org>2002-03-19 05:35:06 +0000
commitbf555a158a99becb3a6ac0c3b2b9502f01cd2bc2 (patch)
tree91c60a9c57cc7eeb59831d28d1611ae6ae20089a /source3
parent0c42e582f8dbeb61e7364cb3e0c8f437dc360c12 (diff)
downloadsamba-bf555a158a99becb3a6ac0c3b2b9502f01cd2bc2.tar.gz
samba-bf555a158a99becb3a6ac0c3b2b9502f01cd2bc2.tar.bz2
samba-bf555a158a99becb3a6ac0c3b2b9502f01cd2bc2.zip
Don't try to sort a list of zero length in internal_resolve_name()
(This used to be commit 5387e4046f67a1c6ef9e98268268b06a729d5ca4)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/namequery.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 0370365953..cd175dcd1d 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -909,7 +909,7 @@ static BOOL internal_resolve_name(const char *name, int name_type,
controllers including the PDC in iplist[1..n]. Iterating over
the iplist when the PDC is down will cause two sets of timeouts. */
- if ((nodupes_iplist = (struct in_addr *)
+ if (*return_count && (nodupes_iplist = (struct in_addr *)
malloc(sizeof(struct in_addr) * (*return_count)))) {
int nodupes_count = 0;