Bug fix: missing close (and leaking file handle)
[idzebra-moved-to-github.git] / isamb / isamb.c
index ca6ba68..2ac59fb 100644 (file)
@@ -1,5 +1,5 @@
-/* $Id: isamb.c,v 1.21 2002-09-03 19:05:02 adam Exp $
-   Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
+/* $Id: isamb.c,v 1.23 2003-03-02 23:12:50 adam Exp $
+   Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003
    Index Data Aps
 
 This file is part of the Zebra server.
@@ -20,7 +20,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 02111-1307, USA.
 */
 
-
+#include <string.h>
 #include <yaz/xmalloc.h>
 #include <yaz/log.h>
 #include <isamb.h>
@@ -249,6 +249,7 @@ void isamb_close (ISAMB isamb)
             bf_write (isamb->file[i].bf, 0, 0,
                       sizeof(struct ISAMB_head), &isamb->file[i].head);
         
+        bf_close (isamb->file[i].bf);
     }
     xfree (isamb->file);
     xfree (isamb->method);