From bf555a158a99becb3a6ac0c3b2b9502f01cd2bc2 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 19 Mar 2002 05:35:06 +0000 Subject: Don't try to sort a list of zero length in internal_resolve_name() (This used to be commit 5387e4046f67a1c6ef9e98268268b06a729d5ca4) --- source3/libsmb/namequery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/libsmb') 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; -- cgit