Skip to content
Permalink
Browse files
Fixed memory leak.
  • Loading branch information
icculus committed Aug 16, 2002
1 parent 752b317 commit 50b40f22a9ee2d8e7720fa446801e393c1d0cf98
Showing with 4 additions and 4 deletions.
  1. +4 −4 archivers/qpak.c
@@ -438,6 +438,9 @@ static int qpak_populateDirectories(QPAKentry *entries, int numEntries,

static void qpak_deletePakInfo (QPAKinfo *pakInfo)
{
if (pakInfo->handle != NULL)
__PHYSFS_platformClose(pakInfo->handle);

if (pakInfo->filename != NULL)
free(pakInfo->filename);

@@ -533,10 +536,7 @@ static DirHandle *QPAK_openArchive(const char *name, int forWriting)

static void QPAK_dirClose(DirHandle *dirHandle)
{
QPAKinfo *info = (QPAKinfo *) dirHandle->opaque;
__PHYSFS_platformClose(info->handle);
free(info->filename);
free(info);
qpak_deletePakInfo((QPAKinfo *) dirHandle->opaque);
free(dirHandle);
} /* QPAK_dirClose */

0 comments on commit 50b40f2

Please sign in to comment.