path: root/lib/libdvbv5/dvb-dev-local.c
diff options
authorSean Young <sean@mess.org>2019-03-17 16:13:45 +0000
committerSean Young <sean@mess.org>2019-03-17 16:31:07 +0000
commitebd890019ba7383b8b486d829f6683c8f49fdbda (patch)
tree3db49cff67a001f0746da416ac1a405c76a972ae /lib/libdvbv5/dvb-dev-local.c
parent39da4509b08eef558a5b416ac688cc3e35e30346 (diff)
libdvbv5: leaks and double free in dvb_fe_open_fname()HEADmaster
dvb_fe_open_fname() takes ownership of fname if the function succeeds, but also in two of the error paths (e.g. if the ioctl FE_GET_PROPERTY fails). Adjust dvb_fe_open_fname() so it copies fname rather than taking ownership (and passing that to params). This makes the code cleaner. Signed-off-by: Sean Young <sean@mess.org>
Diffstat (limited to 'lib/libdvbv5/dvb-dev-local.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libdvbv5/dvb-dev-local.c b/lib/libdvbv5/dvb-dev-local.c
index e98b967a..2de9a614 100644
--- a/lib/libdvbv5/dvb-dev-local.c
+++ b/lib/libdvbv5/dvb-dev-local.c
@@ -467,7 +467,7 @@ static struct dvb_open_descriptor
flags &= ~O_NONBLOCK;
- ret = dvb_fe_open_fname(parms, strdup(dev->path), flags);
+ ret = dvb_fe_open_fname(parms, dev->path, flags);
if (ret) {
return NULL;

Privacy Policy