From 3dd4e7dabdf991868b35421f188cb3b56231c3ce Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 8 Jul 2014 14:30:54 +0200 Subject: [PATCH] smbd: Avoid double-free in get_print_db_byname Signed-off-by: Volker Lendecke --- source3/printing/printing_db.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/printing/printing_db.c b/source3/printing/printing_db.c index ecb8ff6..b721317 100644 --- a/source3/printing/printing_db.c +++ b/source3/printing/printing_db.c @@ -65,9 +65,9 @@ struct tdb_print_db *get_print_db_byname(const char *printername) if (p->ref_count) continue; if (p->tdb) { - if (tdb_close(print_db_head->tdb)) { + if (tdb_close(p->tdb)) { DEBUG(0,("get_print_db: Failed to close tdb for printer %s\n", - print_db_head->printer_name )); + p->printer_name )); return NULL; } } -- 1.7.9.5