From ec49dff32649b009299978cec5899d03f0fff07b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 18 Jun 2006 09:26:05 +0000 Subject: r16338: Fix Klocwork ID 150 (This used to be commit ded2952e00fec712ce612cf6aaabf85c1a6f4488) --- source3/client/smbctool.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source3/client/smbctool.c') diff --git a/source3/client/smbctool.c b/source3/client/smbctool.c index b3acca5573..3233ee4955 100644 --- a/source3/client/smbctool.c +++ b/source3/client/smbctool.c @@ -528,7 +528,14 @@ static void adjust_do_list_queue(void) * 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 == NULL) { + DEBUG(4,("do_list_queue is empty\n")); + do_list_queue_start = do_list_queue_end = 0; + return; + } + + 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; *do_list_queue = '\0'; -- cgit