Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
DVR: fix memory leak in dvr_inotify_add()
  • Loading branch information
perexg committed Oct 21, 2015
1 parent 8b0e8f4 commit cf03d9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dvr/dvr_inotify.c
Expand Up @@ -108,8 +108,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);
Expand Down

0 comments on commit cf03d9a

Please sign in to comment.