[vlc-commits] Fix unlikely memory leak
Rémi Denis-Courmont
git at videolan.org
Sun Oct 2 13:07:22 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct 2 13:55:15 2011 +0300| [895e45bd2aa5d61b01e5be6c7908225b796e0f59] | committer: Rémi Denis-Courmont
Fix unlikely memory leak
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=895e45bd2aa5d61b01e5be6c7908225b796e0f59
---
modules/access/v4l2/controls.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules/access/v4l2/controls.c b/modules/access/v4l2/controls.c
index 9055f02..49db111 100644
--- a/modules/access/v4l2/controls.c
+++ b/modules/access/v4l2/controls.c
@@ -470,8 +470,10 @@ static vlc_v4l2_ctrl_t *ControlAddButton (vlc_object_t *obj, int fd,
return NULL;
if (var_Create (obj, c->name, VLC_VAR_VOID | VLC_VAR_ISCOMMAND))
+ {
+ free (c);
return NULL;
- (void) fd;
+ }
return c;
}
More information about the vlc-commits
mailing list