summaryrefslogtreecommitdiff
path: root/source3/printing/printing.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/printing/printing.c')
-rw-r--r--source3/printing/printing.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 91851a37f8..7a527eebbf 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -156,6 +156,9 @@ static struct tdb_print_db *get_print_db_byname(const char *printername)
pstring printdb_path;
for (p = print_db_head, last_entry = print_db_head; p; p = p->next) {
+ /* Ensure the list terminates... JRA. */
+ SMB_ASSERT(p->next != print_db_head);
+
if (p->tdb && strequal(p->printer_name, printername)) {
DLIST_PROMOTE(print_db_head, p);
p->ref_count++;