Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
b25e76f5
Commit
b25e76f5
authored
Oct 26, 2007
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix potential memleaks in src/input/vlm.c
parent
fc94b7cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
src/input/vlm.c
src/input/vlm.c
+10
-2
No files found.
src/input/vlm.c
View file @
b25e76f5
...
@@ -1849,6 +1849,7 @@ static char *Save( vlm_t *vlm )
...
@@ -1849,6 +1849,7 @@ static char *Save( vlm_t *vlm )
/* now we have the length of save */
/* now we have the length of save */
p
=
save
=
malloc
(
i_length
);
p
=
save
=
malloc
(
i_length
);
if
(
!
save
)
return
NULL
;
*
save
=
'\0'
;
*
save
=
'\0'
;
p
+=
sprintf
(
p
,
"%s"
,
psz_header
);
p
+=
sprintf
(
p
,
"%s"
,
psz_header
);
...
@@ -2341,6 +2342,7 @@ static int vlm_ControlMediaChange( vlm_t *p_vlm, vlm_media_t *p_cfg )
...
@@ -2341,6 +2342,7 @@ static int vlm_ControlMediaChange( vlm_t *p_vlm, vlm_media_t *p_cfg )
return
vlm_OnMediaUpdate
(
p_vlm
,
p_media
);
return
vlm_OnMediaUpdate
(
p_vlm
,
p_media
);
}
}
static
int
vlm_ControlMediaAdd
(
vlm_t
*
p_vlm
,
vlm_media_t
*
p_cfg
,
int64_t
*
p_id
)
static
int
vlm_ControlMediaAdd
(
vlm_t
*
p_vlm
,
vlm_media_t
*
p_cfg
,
int64_t
*
p_id
)
{
{
vlm_media_sys_t
*
p_media
;
vlm_media_sys_t
*
p_media
;
...
@@ -2368,12 +2370,18 @@ static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id
...
@@ -2368,12 +2370,18 @@ static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id
p_vlm
->
p_vod
->
p_data
=
p_vlm
;
p_vlm
->
p_vod
->
p_data
=
p_vlm
;
p_vlm
->
p_vod
->
pf_media_control
=
vlm_MediaVodControl
;
p_vlm
->
p_vod
->
pf_media_control
=
vlm_MediaVodControl
;
}
}
if
(
p_cfg
->
b_vod
)
p_vlm
->
i_vod
++
;
p_media
=
malloc
(
sizeof
(
vlm_media_sys_t
)
);
p_media
=
malloc
(
sizeof
(
vlm_media_sys_t
)
);
if
(
!
p_media
)
{
msg_Err
(
p_vlm
,
"out of memory"
);
return
VLC_ENOMEM
;
}
memset
(
p_media
,
0
,
sizeof
(
vlm_media_sys_t
)
);
memset
(
p_media
,
0
,
sizeof
(
vlm_media_sys_t
)
);
if
(
p_cfg
->
b_vod
)
p_vlm
->
i_vod
++
;
vlm_media_Copy
(
&
p_media
->
cfg
,
p_cfg
);
vlm_media_Copy
(
&
p_media
->
cfg
,
p_cfg
);
p_media
->
cfg
.
id
=
p_vlm
->
i_id
++
;
p_media
->
cfg
.
id
=
p_vlm
->
i_id
++
;
/* FIXME do we do something here if enabled is true ? */
/* FIXME do we do something here if enabled is true ? */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment