Menu

#3 Check if row exists before delete

1.0
closed
nobody
None
2016-12-12
2016-11-20
Alexander
No

it seams like it should be:
void CsvParser_destroy_row(CsvRow *csvRow)
{
if(csvRow == NULL)
return;
...
}
as you do it in CsvParser_destroy function.

Discussion

  • Tal H

    Tal H - 2016-12-07

    The problem was that the header was released twice, manually by user and automatically when the Parser itself is destroyed. Changed "getHeader()" to return a const row, such that it cannot be manually released by user. Other rows should not have such problems, unless the programmer tries to destroy a null pointer or to destroy an already freed pointer

     
  • Tal H

    Tal H - 2016-12-12
    • status: open --> closed
     
  • Tal H

    Tal H - 2016-12-12

    fixed according to last comment by "talh123"

     

Log in to post a comment.

MongoDB Logo MongoDB