Menu

#26 xbNtx double file-close causes coredump

current bugs
closed
None
5
2004-02-18
2003-09-29
Ramon Casha
No

In my class destructor I'm doing the following:

index->CloseIndex();
delete index;

("index" is xbNtx*) However the destructor of xbNtx does its
own CloseIndex without checking if it's already been closed.
Apparently sometimes this causes a seg fault.

Suggestion:
in xbNtx::CloseIndex, just after "if(indexfp) fclose( indexfp );"
add "indexfp = NULL"

Discussion

  • Gary Kunkel

    Gary Kunkel - 2003-09-29
    • milestone: --> current bugs
    • assigned_to: nobody --> gkunkel
     
  • Gary Kunkel

    Gary Kunkel - 2004-02-18

    Logged In: YES
    user_id=37575

    This code update has been added to the library and will be
    available with the next major release,

     
  • Gary Kunkel

    Gary Kunkel - 2004-02-18
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB