From b8bc024e463e9498e6db70d36fc93dcc5673ba50 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 5 Apr 2006 02:52:11 +0000 Subject: [PATCH] In zebra_commit_ex handle better the case where bfs cannot be created --- index/zebraapi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/index/zebraapi.c b/index/zebraapi.c index 7c914b4..320d375 100644 --- a/index/zebraapi.c +++ b/index/zebraapi.c @@ -1,4 +1,4 @@ -/* $Id: zebraapi.c,v 1.212 2006-04-05 02:10:20 adam Exp $ +/* $Id: zebraapi.c,v 1.213 2006-04-05 02:52:11 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -1984,7 +1984,12 @@ static ZEBRA_RES zebra_commit_ex(ZebraHandle zh, int clean_only) zebra_lock_r (zh->lock_shadow); bfs = bfs_create (res_get (zh->res, "register"), zh->path_reg); - + if (!bfs) + { + zebra_unlock(zh->lock_shadow); + zebra_unlock(zh->lock_normal); + return ZEBRA_FAIL; + } zebra_get_state (zh, &val, &seqno); if (rval && *rval) -- 1.7.10.4