summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd_incomingrequests.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/nmbd/nmbd_incomingrequests.c b/source3/nmbd/nmbd_incomingrequests.c
index 7c46204445..c59c045bad 100644
--- a/source3/nmbd/nmbd_incomingrequests.c
+++ b/source3/nmbd/nmbd_incomingrequests.c
@@ -383,7 +383,9 @@ subnet %s - name not found.\n", nmb_namestr(&nmb->question.question_name),
}
/* Remove duplicate names. */
- qsort( buf0, names_added, 18, QSORT_CAST status_compare );
+ if (names_added > 1) {
+ qsort( buf0, names_added, 18, QSORT_CAST status_compare );
+ }
for( i=1; i < names_added ; i++ )
{