Menu

#1 fix some memory leak

open
nobody
None
5
2006-01-15
2006-01-15
No

There were many MBs of memory being leaked in
libmpq_archive_close. Adding this code to
libmpq_archive_close fixed those leaks:
if(mpq_a->blocktable != NULL)
{
free(mpq_a->blocktable);
mpq_a->blocktable = NULL;
}

if\(mpq\_a->hashtable \!= NULL\)
\{
    free\(mpq\_a->hashtable\);
    mpq\_a->hashtable = NULL;
\}

if\(mpq\_a->header \!= NULL\)
\{
    free\(mpq\_a->header\);
    mpq\_a->header = NULL;
\}

Discussion


Log in to post a comment.

MongoDB Logo MongoDB