From: Adam Dickmeiss Date: Wed, 5 Apr 2006 02:52:11 +0000 (+0000) Subject: In zebra_commit_ex handle better the case where bfs cannot be created X-Git-Tag: before.bug.529~170 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=b8bc024e463e9498e6db70d36fc93dcc5673ba50 In zebra_commit_ex handle better the case where bfs cannot be created --- 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)