From: Jaroslav Kysela Date: Wed, 21 Oct 2015 17:30:44 +0000 (+0200) Subject: DVR: fix memory leak in dvr_inotify_add() X-Git-Tag: v4.0.7~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=472131f5f118d2a2bbe1c7a5a9e7918635e5dadc;p=thirdparty%2Ftvheadend.git DVR: fix memory leak in dvr_inotify_add() --- diff --git a/src/dvr/dvr_inotify.c b/src/dvr/dvr_inotify.c index 19e52022c..cab9d35f9 100644 --- a/src/dvr/dvr_inotify.c +++ b/src/dvr/dvr_inotify.c @@ -107,8 +107,10 @@ void dvr_inotify_add ( dvr_entry_t *de ) dvr_inotify_entry_skel->path = dirname(path); e = RB_INSERT_SORTED(&_inot_tree, dvr_inotify_entry_skel, link, _str_cmp); - if (e) + if (e) { + free(path); return; + } e = dvr_inotify_entry_skel; SKEL_USED(dvr_inotify_entry_skel);