Mercurial > hg > audiodb
changeset 377:61b40ed4dc62
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.)
author | mas01cr |
---|---|
date | Fri, 14 Nov 2008 21:15:09 +0000 |
parents | cfc55df37ceb |
children | ac1662433fe6 |
files | insert.cpp |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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)));