projects
/
platform
/
upstream
/
v4l-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60833d8
)
libdvbv5/dvb-scan: avoid memory leak on table read timeout
author
Mauro Carvalho Chehab
<m.chehab@samsung.com>
Mon, 18 Nov 2013 09:52:53 +0000
(07:52 -0200)
committer
Mauro Carvalho Chehab
<m.chehab@samsung.com>
Wed, 27 Nov 2013 11:24:40 +0000
(09:24 -0200)
Free buf, if table read fails with timeout.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
lib/libdvbv5/dvb-scan.c
patch
|
blob
|
history
diff --git
a/lib/libdvbv5/dvb-scan.c
b/lib/libdvbv5/dvb-scan.c
index
36c79c1
..
0eba268
100644
(file)
--- a/
lib/libdvbv5/dvb-scan.c
+++ b/
lib/libdvbv5/dvb-scan.c
@@
-125,6
+125,7
@@
int dvb_read_section_with_id(struct dvb_v5_fe_parms *parms, int dmx_fd,
} while (available < 0 && errno == EOVERFLOW);
if (parms->abort) {
+ free(buf);
if (tbl)
free(tbl);
return 0;
@@
-132,6
+133,7
@@
int dvb_read_section_with_id(struct dvb_v5_fe_parms *parms, int dmx_fd,
if (available <= 0) {
dvb_logerr("dvb_read_section: no data read on pid %x table %x",
pid, tid);
+ free(buf);
if (tbl)
free(tbl);
return -1;