[MPlayer-cvslog] CVS: main vobsub.c,1.39,1.40
Reimar Döffinger CVS
syncmail at mplayerhq.hu
Sat Dec 25 13:08:35 CET 2004
CVS change done by Reimar Döffinger CVS
Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv2060
Modified Files:
vobsub.c
Log Message:
fix memleak in idx parser. patch by elupus [elupus {at] ecce <dot) se]
Index: vobsub.c
===================================================================
RCS file: /cvsroot/mplayer/main/vobsub.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- vobsub.c 25 Nov 2004 22:23:59 -0000 1.39
+++ vobsub.c 25 Dec 2004 12:08:33 -0000 1.40
@@ -946,13 +946,11 @@
{
ssize_t line_size;
int res = -1;
- do {
size_t line_reserve = 0;
char *line = NULL;
+ do {
line_size = getline(&line, &line_reserve, fd);
if (line_size < 0) {
- if (line)
- free(line);
break;
}
if (*line == 0 || *line == '\r' || *line == '\n' || *line == '#')
@@ -984,6 +982,8 @@
mp_msg(MSGT_VOBSUB,MSGL_ERR, "ERROR in %s", line);
break;
} while (1);
+ if (line)
+ free(line);
return res;
}
More information about the MPlayer-cvslog
mailing list