diff options
author | Tim Potter <tpot@samba.org> | 2002-03-19 05:35:06 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-03-19 05:35:06 +0000 |
commit | 5387e4046f67a1c6ef9e98268268b06a729d5ca4 (patch) | |
tree | 84f429adddb63d98531165b51eb4376a5c888bad /source/libsmb/namequery.c | |
parent | e758bdc8a8f37e1d1e1fb0d1d27990dba2067920 (diff) | |
download | samba-5387e4046f67a1c6ef9e98268268b06a729d5ca4.tar.gz samba-5387e4046f67a1c6ef9e98268268b06a729d5ca4.tar.xz samba-5387e4046f67a1c6ef9e98268268b06a729d5ca4.zip |
Don't try to sort a list of zero length in internal_resolve_name()
Diffstat (limited to 'source/libsmb/namequery.c')
-rw-r--r-- | source/libsmb/namequery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/libsmb/namequery.c b/source/libsmb/namequery.c index 0370365953d..cd175dcd1dd 100644 --- a/source/libsmb/namequery.c +++ b/source/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; |