# HG changeset patch # User mas01cr # Date 1226697309 0 # Node ID 61b40ed4dc62e2cee0fa35bc1c9f5985fe355836 # Parent cfc55df37cebdc98b0966b3d2c43801248ce444e Fix double-close() [and double-munmap()] bug in batchinsert. (This bug was responsible for libtests/0024 segfaulting; apparently the double-close() scribbled over some C library state.) diff -r cfc55df37ceb -r 61b40ed4dc62 insert.cpp --- a/insert.cpp Fri Nov 14 21:15:02 2008 +0000 +++ b/insert.cpp Fri Nov 14 21:15:09 2008 +0000 @@ -327,9 +327,12 @@ memcpy (db, dbH, sizeof(dbTableHeaderT)); } } + // CLEAN UP munmap(indata,statbuf.st_size); + indata = NULL; close(infid); + infid = 0; } while(!filesIn->eof()); VERB_LOG(0, "%s %s %u vectors %ju bytes.\n", COM_BATCHINSERT, dbName, totalVectors, (intmax_t) (totalVectors * dbH->dim * sizeof(double)));