View Issue Details

IDProjectCategoryView StatusLast Update
0000009JVT JM H.264/AVC reference softwareencoder and decoderpublic2006-08-16 16:49
ReporterKarsten Suehring Assigned ToKarsten Suehring  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformany 
Product VersionJM 11.0 
Fixed in VersionJM 12.0 
Summary0000009: Memory leaks mainly in error paths
DescriptionWinston:

That's serveral lines that I indicated on valgrind. Hope this helps.

Arrows indicate lines that I added

In nalucommon.c

NALU_t *AllocNALU(int buffersize)
{
  ...
  if ((n->buf = (byte*)calloc (buffersize, sizeof (byte))) == NULL)
  { <--
    free(n); <--
    no_mem_exit ("AllocNALU: n->buf");
  } <--
  ...
}

In image.c

int read_new_slice()
{
  ...
  if (ret == 0)
  {
    FreeNALU(nalu); <--
    return EOS;
  }
  ...
  // It happens 2 times
  if (ret == 0)
  { <--
    FreeNALU(nalu); <--
    return current_header;
  } <--
  ...
}

In annexb.c

int GetAnnexbNALU (NALU_t *nalu)
{
  ...
  if(pos==0)
  { <--
    free(Buf); <--
    return 0;
  } <--
  ...
}

Also, in parset.c

In void MakePPSavailable (int id, pic_parameter_set_rbsp_t *pps)

PicParSet[id].slice_group_id is allocated but it's not freed when program exit

Regards,
Winston

TagsNo tags attached.

Activities

Karsten Suehring

2006-08-16 16:49

administrator   ~0000006

applied provided fixes

Issue History

Date Modified Username Field Change
2006-08-16 16:48 Karsten Suehring New Issue
2006-08-16 16:48 Karsten Suehring Status new => assigned
2006-08-16 16:48 Karsten Suehring Assigned To => Karsten Suehring
2006-08-16 16:49 Karsten Suehring Status assigned => resolved
2006-08-16 16:49 Karsten Suehring Fixed in Version => JM 11.0-devel
2006-08-16 16:49 Karsten Suehring Resolution open => fixed
2006-08-16 16:49 Karsten Suehring Note Added: 0000006