From: Karl Malbrain Date: Mon, 2 Dec 2013 21:36:23 +0000 (-0800) Subject: fix bug in bt_newpage X-Git-Url: https://pd.if.org/git/?a=commitdiff_plain;h=ec27ea5d0d9c53d169c0eda3071df2f644ebdcef;p=btree fix bug in bt_newpage --- diff --git a/jaluta.c b/jaluta.c index 66596c0..125fe4e 100644 --- a/jaluta.c +++ b/jaluta.c @@ -979,6 +979,8 @@ int reuse; if( !bt->mapped_io ) { if( bt_update(bt, page, new_page) ) return 0; //don't unlock on error + if ( bt_unlockpage(bt, ALLOC_page, BtLockWrite) ) + return 0; return new_page; }