aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-09-14 10:49:58 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-09-14 13:01:26 -0300
commitb7e528a347f4cb8bbeb68cda0e8216d26b875169 (patch)
treec41d91df58a1ca08c67dbbc542e1245a1274864c
parent02c7915dbc4ab07e05a72575dc59789fcf10b373 (diff)
libdvbv5: Don't double-free the file name
At some error conditions at dvb-fe.c, dvb_v5_free() is called, plus an extra free(). This causes a core dump, due to double-free. Remove the extra free(). While here, improve the error message when the ENUM_DELSYS doesn't work fine. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--lib/libdvbv5/dvb-fe.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/libdvbv5/dvb-fe.c b/lib/libdvbv5/dvb-fe.c
index 71d6e5cd..b9981e7f 100644
--- a/lib/libdvbv5/dvb-fe.c
+++ b/lib/libdvbv5/dvb-fe.c
@@ -181,7 +181,6 @@ struct dvb_v5_fe_parms *dvb_fe_open_flags(int adapter, int frontend,
dvb_logerr("delivery system not detected");
dvb_v5_free(parms);
close(fd);
- free(fname);
return NULL;
}
} else {
@@ -193,7 +192,6 @@ struct dvb_v5_fe_parms *dvb_fe_open_flags(int adapter, int frontend,
dvb_perror("FE_GET_PROPERTY");
dvb_v5_free(parms);
close(fd);
- free(fname);
return NULL;
}
parms->p.num_systems = parms->dvb_prop[0].u.buffer.len;
@@ -201,10 +199,9 @@ struct dvb_v5_fe_parms *dvb_fe_open_flags(int adapter, int frontend,
parms->p.systems[i] = parms->dvb_prop[0].u.buffer.data[i];
if (parms->p.num_systems == 0) {
- dvb_logerr("driver died while trying to set the delivery system");
+ dvb_logerr("driver returned 0 supported delivery systems!");
dvb_v5_free(parms);
close(fd);
- free(fname);
return NULL;
}
}

Privacy Policy