r14979: avoid a null ptr deref
authorAndrew Tridgell <tridge@samba.org>
Sat, 8 Apr 2006 02:49:44 +0000 (02:49 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:00:50 +0000 (14:00 -0500)
source/client/client.c

index ceb949ffd9689ef44040730cdbe5ec1a93c7a798..b016632fbdffec0e4aba3d47e867f7aecc0c18fe 100644 (file)
@@ -408,11 +408,13 @@ static void init_do_list_queue(void)
 
 static void adjust_do_list_queue(void)
 {
+       if (do_list_queue == NULL) return;
+
        /*
         * If the starting point of the queue is more than half way through,
         * move everything toward the beginning.
         */
-       if (do_list_queue && (do_list_queue_start == do_list_queue_end))
+       if (do_list_queue_start == do_list_queue_end)
        {
                DEBUG(4,("do_list_queue is empty\n"));
                do_list_queue_start = do_list_queue_end = 0;