From 2947c098ced6086c0ac0fa9d2b9e1a0101fe6a50 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 18 Aug 2006 10:12:21 +0000 Subject: [PATCH] oi_list might be null if overlay initialization failed for any reason --- servers/slapd/backover.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/servers/slapd/backover.c b/servers/slapd/backover.c index f14b327019..3ffd188285 100644 --- a/servers/slapd/backover.c +++ b/servers/slapd/backover.c @@ -210,10 +210,13 @@ over_db_destroy( rc = over_db_func( be, db_destroy ); - for (next = on->on_next; on; on=next) { - next = on->on_next; - free( on ); + if ( on ) { + for (next = on->on_next; on; on=next) { + next = on->on_next; + free( on ); + } } + free( oi ); return rc; } -- 2.39.5