Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
69dd295b
Commit
69dd295b
authored
Oct 23, 2002
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ALL: fixed a bunch of memory leaks.
parent
4e9d7900
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
11 deletions
+21
-11
modules/access/dvdplay/tools.c
modules/access/dvdplay/tools.c
+4
-1
modules/access/dvdread/input.c
modules/access/dvdread/input.c
+8
-8
modules/demux/aac/demux.c
modules/demux/aac/demux.c
+3
-1
modules/demux/mpeg/audio.c
modules/demux/mpeg/audio.c
+6
-1
No files found.
modules/access/dvdplay/tools.c
View file @
69dd295b
...
...
@@ -2,7 +2,7 @@
* tools.c: tools for dvd plugin.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: tools.c,v 1.
1 2002/08/04 17:23:42 sam
Exp $
* $Id: tools.c,v 1.
2 2002/10/23 21:54:33 gbazin
Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
...
...
@@ -97,12 +97,14 @@ char * dvdplay_ParseCL( input_thread_t * p_input,
return
NULL
;
}
psz_source
=
config_GetPsz
(
p_input
,
"dvd"
);
if
(
!
psz_source
)
return
NULL
;
}
if
(
stat
(
psz_source
,
&
stat_info
)
==
-
1
)
{
msg_Err
(
p_input
,
"cannot stat() source `%s' (%s)"
,
psz_source
,
strerror
(
errno
));
free
(
psz_source
);
return
NULL
;
}
if
(
!
S_ISBLK
(
stat_info
.
st_mode
)
&&
...
...
@@ -111,6 +113,7 @@ char * dvdplay_ParseCL( input_thread_t * p_input,
{
msg_Dbg
(
p_input
,
"plugin discarded"
" (not a valid source)"
);
free
(
psz_source
);
return
NULL
;
}
...
...
modules/access/dvdread/input.c
View file @
69dd295b
...
...
@@ -6,7 +6,7 @@
* It depends on: libdvdread for ifo files and block reading.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: input.c,v 1.
4 2002/08/30 22:22:24 massiot
Exp $
* $Id: input.c,v 1.
5 2002/10/23 21:54:33 gbazin
Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
...
...
@@ -236,7 +236,6 @@ static int DvdReadRewind( input_thread_t * p_input )
int
E_
(
OpenDVD
)
(
vlc_object_t
*
p_this
)
{
input_thread_t
*
p_input
=
(
input_thread_t
*
)
p_this
;
char
*
psz_orig
;
char
*
psz_parser
;
char
*
psz_source
;
char
*
psz_next
;
...
...
@@ -249,8 +248,8 @@ int E_(OpenDVD) ( vlc_object_t *p_this )
int
i_angle
=
1
;
int
i
;
psz_
orig
=
psz_
parser
=
psz_source
=
strdup
(
p_input
->
psz_name
);
if
(
!
psz_
orig
)
psz_parser
=
psz_source
=
strdup
(
p_input
->
psz_name
);
if
(
!
psz_
source
)
{
return
(
-
1
);
}
...
...
@@ -289,18 +288,20 @@ int E_(OpenDVD) ( vlc_object_t *p_this )
if
(
!*
psz_source
)
{
free
(
psz_source
);
if
(
!
p_input
->
psz_access
)
{
free
(
psz_orig
);
return
-
1
;
}
psz_source
=
config_GetPsz
(
p_input
,
"dvd"
);
if
(
!
psz_source
)
return
-
1
;
}
if
(
stat
(
psz_source
,
&
stat_info
)
==
-
1
)
{
msg_Err
(
p_input
,
"cannot stat() source `%s' (%s)"
,
psz_source
,
strerror
(
errno
));
free
(
psz_source
);
return
(
-
1
);
}
if
(
!
S_ISBLK
(
stat_info
.
st_mode
)
&&
...
...
@@ -308,6 +309,7 @@ int E_(OpenDVD) ( vlc_object_t *p_this )
!
S_ISDIR
(
stat_info
.
st_mode
)
)
{
msg_Warn
(
p_input
,
"dvdread module discarded (not a valid source)"
);
free
(
psz_source
);
return
-
1
;
}
...
...
@@ -318,9 +320,7 @@ int E_(OpenDVD) ( vlc_object_t *p_this )
p_dvdread
=
DVDOpen
(
psz_source
);
/* free allocated strings */
if
(
psz_source
!=
psz_orig
)
free
(
psz_source
);
free
(
psz_orig
);
if
(
!
p_dvdread
)
{
...
...
modules/demux/aac/demux.c
View file @
69dd295b
...
...
@@ -2,7 +2,7 @@
* demux.c : Raw aac Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: demux.c,v 1.
2 2002/08/24 21:35:31 sigmunau
Exp $
* $Id: demux.c,v 1.
3 2002/10/23 21:54:33 gbazin
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -475,11 +475,13 @@ static int Activate( vlc_object_t * p_this )
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
if
(
input_InitStream
(
p_input
,
0
)
==
-
1
)
{
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
msg_Err
(
p_input
,
"cannot init stream"
);
return
(
-
1
);
}
if
(
input_AddProgram
(
p_input
,
0
,
0
)
==
NULL
)
{
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
msg_Err
(
p_input
,
"cannot add program"
);
return
(
-
1
);
}
...
...
modules/demux/mpeg/audio.c
View file @
69dd295b
...
...
@@ -2,7 +2,7 @@
* audio.c : mpeg audio Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: audio.c,v 1.
8 2002/08/24 21:35:31 sigmunau
Exp $
* $Id: audio.c,v 1.
9 2002/10/23 21:54:33 gbazin
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -513,6 +513,7 @@ static int Activate( vlc_object_t * p_this )
/* check if it could be a ps stream */
if
(
!
b_forced
&&
CheckPS
(
p_input
))
{
free
(
p_input
->
p_demux_data
);
return
(
-
1
);
}
...
...
@@ -532,6 +533,7 @@ static int Activate( vlc_object_t * p_this )
else
{
msg_Warn
(
p_input
,
"MPEGAudio module discarded (no frame found)"
);
free
(
p_input
->
p_demux_data
);
return
(
-
1
);
}
}
...
...
@@ -545,11 +547,13 @@ static int Activate( vlc_object_t * p_this )
if
(
input_InitStream
(
p_input
,
0
)
==
-
1
)
{
msg_Err
(
p_input
,
"cannot init stream"
);
free
(
p_input
->
p_demux_data
);
return
(
-
1
);
}
if
(
input_AddProgram
(
p_input
,
0
,
0
)
==
NULL
)
{
msg_Err
(
p_input
,
"cannot add program"
);
free
(
p_input
->
p_demux_data
);
return
(
-
1
);
}
p_input
->
stream
.
pp_programs
[
0
]
->
b_is_ok
=
0
;
...
...
@@ -564,6 +568,7 @@ static int Activate( vlc_object_t * p_this )
{
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
msg_Err
(
p_input
,
"out of memory"
);
free
(
p_input
->
p_demux_data
);
return
(
-
1
);
}
p_demux
->
p_es
->
i_stream_id
=
1
;
...
...
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