fixed memory leak in libdvbmpeg read_pes (fixes #769)

This commit is contained in:
Frank Schmirler 2011-11-12 22:30:48 +01:00
parent 8850e63da5
commit 30674fb6c8
3 changed files with 6 additions and 1 deletions

View File

@ -196,3 +196,4 @@ Lubo
Ville Skyttä Ville Skyttä
for updating the outdated COPYING file and FSF address for updating the outdated COPYING file and FSF address
for restricting VTP command RENR to liemikuutio patch < 1.32 for restricting VTP command RENR to liemikuutio patch < 1.32
for fixing memory and filedescriptor leaks in libdvbmpeg

View File

@ -1,6 +1,7 @@
VDR Plugin 'streamdev' Revision History VDR Plugin 'streamdev' Revision History
--------------------------------------- ---------------------------------------
- fixed memory leak in libdvbmpeg read_pes (thanks to Ville Skyttä)
- dropped several unused functions in libdvbmpeg - dropped several unused functions in libdvbmpeg
- restricted VTP command RENR to liemikuutio patch < 1.32. Build fails with - restricted VTP command RENR to liemikuutio patch < 1.32. Build fails with
newer versions of this patch (thanks to Ville Skyttä) newer versions of this patch (thanks to Ville Skyttä)

View File

@ -596,7 +596,10 @@ int read_pes(int f, pes_packet *p){
if (p->length >0){ if (p->length >0){
buf = (uint8_t *) malloc(p->length); buf = (uint8_t *) malloc(p->length);
if((neof = save_read(f,buf,p->length))< p->length) return -1; if((neof = save_read(f,buf,p->length))< p->length){
free(buf);
return -1;
}
cread_pes((char *)buf,p); cread_pes((char *)buf,p);
free(buf); free(buf);
} else return 0; } else return 0;