Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
9630c00c
Commit
9630c00c
authored
Mar 12, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another time "Remove useless test before a free".
parent
85943656
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
149 additions
and
155 deletions
+149
-155
modules/access/cdda.c
modules/access/cdda.c
+2
-3
modules/access/cdda/access.c
modules/access/cdda/access.c
+8
-9
modules/access/dc1394.c
modules/access/dc1394.c
+9
-11
modules/access/directory.c
modules/access/directory.c
+6
-6
modules/access/dshow/dshow.cpp
modules/access/dshow/dshow.cpp
+4
-4
modules/access/dvdread.c
modules/access/dvdread.c
+1
-1
modules/access/ftp.c
modules/access/ftp.c
+1
-1
modules/access/http.c
modules/access/http.c
+11
-12
modules/access/jack.c
modules/access/jack.c
+9
-9
modules/access/rtsp/access.c
modules/access/rtsp/access.c
+4
-4
modules/access/rtsp/real.c
modules/access/rtsp/real.c
+17
-17
modules/access/rtsp/real_rmff.c
modules/access/rtsp/real_rmff.c
+10
-10
modules/access/rtsp/real_sdpplin.c
modules/access/rtsp/real_sdpplin.c
+33
-33
modules/access/rtsp/rtsp.c
modules/access/rtsp/rtsp.c
+9
-9
modules/access/smb.c
modules/access/smb.c
+6
-6
modules/access/v4l.c
modules/access/v4l.c
+8
-8
modules/access/v4l2/v4l2.c
modules/access/v4l2/v4l2.c
+4
-4
modules/access/vcd/cdrom.c
modules/access/vcd/cdrom.c
+6
-7
modules/audio_filter/normvol.c
modules/audio_filter/normvol.c
+1
-1
No files found.
modules/access/cdda.c
View file @
9630c00c
...
...
@@ -154,7 +154,7 @@ static int Open( vlc_object_t *p_this )
psz_name
=
var_CreateGetString
(
p_this
,
"cd-audio"
);
if
(
!
psz_name
||
!*
psz_name
)
{
if
(
psz_name
)
free
(
psz_name
);
free
(
psz_name
);
return
VLC_EGENERIC
;
}
}
...
...
@@ -478,8 +478,7 @@ static int GetTracks( access_t *p_access,
{
if
(
cddb_track_get_title
(
t
)
!=
NULL
)
{
if
(
p_input_item
->
psz_name
)
free
(
p_input_item
->
psz_name
);
free
(
p_input_item
->
psz_name
);
p_input_item
->
psz_name
=
strdup
(
cddb_track_get_title
(
t
)
);
input_item_SetTitle
(
p_input_item
,
cddb_track_get_title
(
t
)
);
}
...
...
modules/access/cdda/access.c
View file @
9630c00c
...
...
@@ -306,8 +306,8 @@ static block_t * CDDAReadBlocks( access_t * p_access )
msg_Err
(
p_access
,
"%s%s
\n
"
,
psz_mes
?
psz_mes
:
""
,
psz_err
?
psz_err
:
""
);
if
(
psz_err
)
free
(
psz_err
);
if
(
psz_mes
)
free
(
psz_mes
);
free
(
psz_err
);
free
(
psz_mes
);
if
(
!
p_readbuf
)
{
msg_Err
(
p_access
,
"paranoia read error on frame %i
\n
"
,
...
...
@@ -400,7 +400,7 @@ CDDARead( access_t * p_access, uint8_t *p_buffer, size_t i_len )
{
char
*
psz_title
=
CDDAFormatTitle
(
p_access
,
p_cdda
->
i_track
);
input_Control
(
p_cdda
->
p_input
,
INPUT_SET_NAME
,
psz_title
);
free
(
psz_title
);
free
(
psz_title
);
}
else
{
...
...
@@ -628,8 +628,7 @@ int CDDAOpen( vlc_object_t *p_this )
if
(
!
(
p_cdio
=
cdio_open
(
psz_source
,
DRIVER_UNKNOWN
))
)
{
msg_Warn
(
p_access
,
"could not open %s"
,
psz_source
);
if
(
psz_source
)
free
(
psz_source
);
free
(
psz_source
);
return
VLC_EGENERIC
;
}
...
...
@@ -809,7 +808,7 @@ int CDDAOpen( vlc_object_t *p_this )
error:
cdio_destroy
(
p_cdda
->
p_cdio
);
if
(
psz_source
)
free
(
psz_source
);
free
(
psz_source
);
if
(
p_cdda
)
{
if
(
p_cdda
->
p_input
)
...
...
@@ -857,8 +856,8 @@ void CDDAClose (vlc_object_t *p_this )
cdio_cddap_close_no_free_cdio
(
p_cdda
->
paranoia_cd
);
#endif
if
(
p_cdda
->
psz_mcn
)
free
(
p_cdda
->
psz_mcn
);
if
(
p_cdda
->
psz_source
)
free
(
p_cdda
->
psz_source
);
free
(
p_cdda
->
psz_mcn
);
free
(
p_cdda
->
psz_source
);
#if LIBCDDB_VERSION_NUM >= 1
libcddb_shutdown
();
...
...
@@ -1006,7 +1005,7 @@ static int CDDAControl( access_t *p_access, int i_query, va_list args )
char
*
psz_title
=
CDDAFormatTitle
(
p_access
,
i_track
);
input_Control
(
p_cdda
->
p_input
,
INPUT_SET_NAME
,
psz_title
);
free
(
psz_title
);
free
(
psz_title
);
p_cdda
->
i_track
=
i_track
;
i_last_lsn
=
cdio_get_track_lsn
(
p_cdda
->
p_cdio
,
CDIO_CDROM_LEADOUT_TRACK
);
...
...
modules/access/dc1394.c
View file @
9630c00c
...
...
@@ -628,10 +628,8 @@ static void Close( vlc_object_t *p_this )
dc1394_destroy_handle
(
p_sys
->
fd_video
);
CloseAudioDev
(
p_demux
);
if
(
p_sys
->
camera_nodes
)
free
(
p_sys
->
camera_nodes
);
if
(
p_sys
->
audio_device
)
free
(
p_sys
->
audio_device
);
free
(
p_sys
->
camera_nodes
);
free
(
p_sys
->
audio_device
);
free
(
p_sys
);
}
...
...
@@ -859,7 +857,7 @@ static int process_options( demux_t *p_demux )
"video size of 160x120 is actually disabled for lack of chroma "
"support. It will relased ASAP, until then try an higher size "
"(320x240 and 640x480 are fully supported)"
);
free
(
psz_dup
);
free
(
psz_dup
);
return
VLC_EGENERIC
;
#if 0
p_sys->frame_size = MODE_160x120_YUV444;
...
...
@@ -886,7 +884,7 @@ static int process_options( demux_t *p_demux )
" 160x120, 320x240, and 640x480. "
"Please specify one of them. You have specified %s."
,
token
);
free
(
psz_dup
);
free
(
psz_dup
);
return
VLC_EGENERIC
;
}
msg_Dbg
(
p_demux
,
"Requested video size : %s"
,
token
);
...
...
@@ -914,7 +912,7 @@ static int process_options( demux_t *p_demux )
" 1.875, 3.75, 7.5, 15, 30, 60. "
"Please specify one of them. You have specified %s."
,
token
);
free
(
psz_dup
);
free
(
psz_dup
);
return
VLC_EGENERIC
;
}
msg_Dbg
(
p_demux
,
"Requested frame rate : %s"
,
token
);
...
...
@@ -929,7 +927,7 @@ static int process_options( demux_t *p_demux )
msg_Err
(
p_demux
,
"Bad brightness value '%s', "
"must be an unsigned integer."
,
token
);
free
(
psz_dup
);
free
(
psz_dup
);
return
VLC_EGENERIC
;
}
}
...
...
@@ -958,7 +956,7 @@ static int process_options( demux_t *p_demux )
msg_Err
(
p_demux
,
"Bad camera number '%s', "
"must be an unsigned integer."
,
token
);
free
(
psz_dup
);
free
(
psz_dup
);
return
VLC_EGENERIC
;
}
}
...
...
@@ -980,7 +978,7 @@ static int process_options( demux_t *p_demux )
msg_Err
(
p_demux
,
"Bad capture method value '%s', "
"it can be 'raw1394' or 'video1394'."
,
token
);
free
(
psz_dup
);
free
(
psz_dup
);
return
VLC_EGENERIC
;
}
}
...
...
@@ -1011,7 +1009,7 @@ static int process_options( demux_t *p_demux )
sscanf
(
token
,
"0x%llx"
,
&
p_sys
->
selected_uid
);
}
}
if
(
psz_dup
)
free
(
psz_dup
);
free
(
psz_dup
);
return
VLC_SUCCESS
;
}
modules/access/directory.c
View file @
9630c00c
...
...
@@ -266,7 +266,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len)
playlist_Signal
(
p_playlist
);
if
(
psz_name
)
free
(
psz_name
);
free
(
psz_name
);
vlc_object_release
(
p_input
);
vlc_object_release
(
p_playlist
);
...
...
@@ -455,7 +455,7 @@ static int ReadDir( playlist_t *p_playlist, const char *psz_name,
psz_parser
=
ptr
+
1
;
}
}
if
(
psz_ignore
)
free
(
psz_ignore
);
free
(
psz_ignore
);
/* While we still have entries in the directory */
for
(
i
=
0
;
i
<
i_dir_content
;
i
++
)
...
...
@@ -545,12 +545,12 @@ static int ReadDir( playlist_t *p_playlist, const char *psz_name,
}
for
(
i
=
0
;
i
<
i_extensions
;
i
++
)
if
(
ppsz_extensions
[
i
]
)
free
(
ppsz_extensions
[
i
]
);
if
(
ppsz_extensions
)
free
(
ppsz_extensions
);
free
(
ppsz_extensions
[
i
]
);
free
(
ppsz_extensions
);
for
(
i
=
0
;
i
<
i_dir_content
;
i
++
)
if
(
pp_dir_content
[
i
]
)
free
(
pp_dir_content
[
i
]
);
if
(
pp_dir_content
)
free
(
pp_dir_content
);
free
(
pp_dir_content
[
i
]
);
free
(
pp_dir_content
);
return
i_return
;
}
...
...
modules/access/dshow/dshow.cpp
View file @
9630c00c
...
...
@@ -333,12 +333,12 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
var_Create
(
p_this
,
"dshow-vdev"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_Get
(
p_this
,
"dshow-vdev"
,
&
val
);
if
(
val
.
psz_string
)
vdevname
=
string
(
val
.
psz_string
);
if
(
val
.
psz_string
)
free
(
val
.
psz_string
);
free
(
val
.
psz_string
);
var_Create
(
p_this
,
"dshow-adev"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_Get
(
p_this
,
"dshow-adev"
,
&
val
);
if
(
val
.
psz_string
)
adevname
=
string
(
val
.
psz_string
);
if
(
val
.
psz_string
)
free
(
val
.
psz_string
);
free
(
val
.
psz_string
);
static
struct
{
char
*
psz_size
;
int
i_width
;
int
i_height
;}
size_table
[]
=
{
{
"subqcif"
,
128
,
96
},
{
"qsif"
,
160
,
120
},
{
"qcif"
,
176
,
144
},
...
...
@@ -370,7 +370,7 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
msg_Dbg
(
p_this
,
"width x height %dx%d"
,
i_width
,
i_height
);
}
}
if
(
val
.
psz_string
)
free
(
val
.
psz_string
);
free
(
val
.
psz_string
);
p_sys
->
b_chroma
=
VLC_FALSE
;
var_Create
(
p_this
,
"dshow-chroma"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
...
...
@@ -381,7 +381,7 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
val
.
psz_string
[
2
],
val
.
psz_string
[
3
]
);
p_sys
->
b_chroma
=
VLC_TRUE
;
}
if
(
val
.
psz_string
)
free
(
val
.
psz_string
);
free
(
val
.
psz_string
);
var_Create
(
p_this
,
"dshow-fps"
,
VLC_VAR_FLOAT
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_this
,
"dshow-tuner-channel"
,
...
...
modules/access/dvdread.c
View file @
9630c00c
...
...
@@ -229,7 +229,7 @@ static int Open( vlc_object_t *p_this )
putenv
(
psz_env
);
}
if
(
psz_dvdcss_env
)
free
(
psz_dvdcss_env
);
free
(
psz_dvdcss_env
);
/* Open dvdread */
if
(
!
(
p_dvdread
=
DVDOpen
(
psz_name
))
)
...
...
modules/access/ftp.c
View file @
9630c00c
...
...
@@ -623,7 +623,7 @@ static int ftp_ReadCommand( vlc_object_t *p_access, access_sys_t *p_sys,
if
(
psz_line
==
NULL
||
strlen
(
psz_line
)
<
3
)
{
msg_Err
(
p_access
,
"cannot get answer"
);
if
(
psz_line
)
free
(
psz_line
);
free
(
psz_line
);
if
(
pi_answer
)
*
pi_answer
=
500
;
if
(
ppsz_answer
)
*
ppsz_answer
=
NULL
;
return
-
1
;
...
...
modules/access/http.c
View file @
9630c00c
...
...
@@ -356,14 +356,14 @@ connect:
psz_login
,
psz_password
);
if
(
psz_login
)
p_sys
->
url
.
psz_username
=
strdup
(
psz_login
);
if
(
psz_password
)
p_sys
->
url
.
psz_password
=
strdup
(
psz_password
);
if
(
psz_login
)
free
(
psz_login
);
if
(
psz_password
)
free
(
psz_password
);
free
(
psz_login
);
free
(
psz_password
);
goto
connect
;
}
else
{
if
(
psz_login
)
free
(
psz_login
);
if
(
psz_password
)
free
(
psz_password
);
free
(
psz_login
);
free
(
psz_password
);
goto
error
;
}
}
...
...
@@ -614,7 +614,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
{
/* read the empty line */
char
*
psz
=
net_Gets
(
VLC_OBJECT
(
p_access
),
p_sys
->
fd
,
p_sys
->
p_vs
);
if
(
psz
)
free
(
psz
);
free
(
psz
);
}
}
}
...
...
@@ -712,8 +712,7 @@ static int ReadICYMeta( access_t *p_access )
if
(
!
p_sys
->
psz_icy_title
||
strcmp
(
p_sys
->
psz_icy_title
,
&
p
[
1
]
)
)
{
if
(
p_sys
->
psz_icy_title
)
free
(
p_sys
->
psz_icy_title
);
free
(
p_sys
->
psz_icy_title
);
p_sys
->
psz_icy_title
=
strdup
(
&
p
[
1
]
);
p_access
->
info
.
i_update
|=
INPUT_UPDATE_META
;
...
...
@@ -1241,12 +1240,12 @@ static int Request( access_t *p_access, int64_t i_tell )
psz_new_loc
=
strdup
(
p
);
}
if
(
p_sys
->
psz_location
)
free
(
p_sys
->
psz_location
);
free
(
p_sys
->
psz_location
);
p_sys
->
psz_location
=
psz_new_loc
;
}
else
if
(
!
strcasecmp
(
psz
,
"Content-Type"
)
)
{
if
(
p_sys
->
psz_mime
)
free
(
p_sys
->
psz_mime
);
free
(
p_sys
->
psz_mime
);
p_sys
->
psz_mime
=
strdup
(
p
);
msg_Dbg
(
p_access
,
"Content-Type: %s"
,
p_sys
->
psz_mime
);
}
...
...
@@ -1264,7 +1263,7 @@ static int Request( access_t *p_access, int64_t i_tell )
{
if
(
!
strcasecmp
(
psz
,
"Pragma: features"
)
)
p_sys
->
b_mms
=
VLC_TRUE
;
if
(
p_sys
->
psz_pragma
)
free
(
p_sys
->
psz_pragma
);
free
(
p_sys
->
psz_pragma
);
p_sys
->
psz_pragma
=
strdup
(
p
);
msg_Dbg
(
p_access
,
"Pragma: %s"
,
p_sys
->
psz_pragma
);
}
...
...
@@ -1305,7 +1304,7 @@ static int Request( access_t *p_access, int64_t i_tell )
}
else
if
(
!
strcasecmp
(
psz
,
"Icy-Name"
)
)
{
if
(
p_sys
->
psz_icy_name
)
free
(
p_sys
->
psz_icy_name
);
free
(
p_sys
->
psz_icy_name
);
p_sys
->
psz_icy_name
=
strdup
(
p
);
msg_Dbg
(
p_access
,
"Icy-Name: %s"
,
p_sys
->
psz_icy_name
);
...
...
@@ -1315,7 +1314,7 @@ static int Request( access_t *p_access, int64_t i_tell )
}
else
if
(
!
strcasecmp
(
psz
,
"Icy-Genre"
)
)
{
if
(
p_sys
->
psz_icy_genre
)
free
(
p_sys
->
psz_icy_genre
);
free
(
p_sys
->
psz_icy_genre
);
p_sys
->
psz_icy_genre
=
strdup
(
p
);
msg_Dbg
(
p_access
,
"Icy-Genre: %s"
,
p_sys
->
psz_icy_genre
);
}
...
...
modules/access/jack.c
View file @
9630c00c
...
...
@@ -215,9 +215,9 @@ static int Open( vlc_object_t *p_this )
{
msg_Err
(
p_demux
,
"failed to register a JACK port"
);
if
(
p_sys
->
p_jack_client
)
jack_client_close
(
p_sys
->
p_jack_client
);
if
(
p_sys
->
pp_jack_port_input
)
free
(
p_sys
->
pp_jack_port_input
);
free
(
p_sys
->
pp_jack_port_input
);
if
(
p_sys
->
p_jack_ringbuffer
)
jack_ringbuffer_free
(
p_sys
->
p_jack_ringbuffer
);
if
(
p_sys
->
pp_jack_buffer
)
free
(
p_sys
->
pp_jack_buffer
);
free
(
p_sys
->
pp_jack_buffer
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
...
...
@@ -240,9 +240,9 @@ static int Open( vlc_object_t *p_this )
{
msg_Err
(
p_demux
,
"failed to activate JACK client"
);
if
(
p_sys
->
p_jack_client
)
jack_client_close
(
p_sys
->
p_jack_client
);
if
(
p_sys
->
pp_jack_port_input
)
free
(
p_sys
->
pp_jack_port_input
);
free
(
p_sys
->
pp_jack_port_input
);
if
(
p_sys
->
p_jack_ringbuffer
)
jack_ringbuffer_free
(
p_sys
->
p_jack_ringbuffer
);
if
(
p_sys
->
pp_jack_buffer
)
free
(
p_sys
->
pp_jack_buffer
);
free
(
p_sys
->
pp_jack_buffer
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
...
...
@@ -287,7 +287,7 @@ static int Open( vlc_object_t *p_this )
jack_port_name
(
p_sys
->
pp_jack_port_input
[
i_input_ports
]
)
);
}
}
if
(
pp_jack_port_output
)
free
(
pp_jack_port_output
);
free
(
pp_jack_port_output
);
}
/* info about jack server */
...
...
@@ -327,9 +327,9 @@ static void Close( vlc_object_t *p_this )
if
(
p_sys
->
p_block_audio
)
block_Release
(
p_sys
->
p_block_audio
);
if
(
p_sys
->
p_jack_client
)
jack_client_close
(
p_sys
->
p_jack_client
);
if
(
p_sys
->
p_jack_ringbuffer
)
jack_ringbuffer_free
(
p_sys
->
p_jack_ringbuffer
);
if
(
p_sys
->
pp_jack_port_input
)
free
(
p_sys
->
pp_jack_port_input
);
if
(
p_sys
->
pp_jack_buffer
)
free
(
p_sys
->
pp_jack_buffer
);
if
(
p_sys
->
pp_jack_port_table
)
free
(
p_sys
->
pp_jack_port_table
);
free
(
p_sys
->
pp_jack_port_input
);
free
(
p_sys
->
pp_jack_buffer
);
free
(
p_sys
->
pp_jack_port_table
);
free
(
p_sys
);
}
...
...
@@ -546,7 +546,7 @@ static void Port_finder( demux_t *p_demux )
}
}
if
(
pp_jack_port_output
)
free
(
pp_jack_port_output
);
free
(
pp_jack_port_output
);
p_sys
->
i_match_ports
=
i_total_out_ports
;
}
...
...
modules/access/rtsp/access.c
View file @
9630c00c
...
...
@@ -131,7 +131,7 @@ static int RtspReadLine( void *p_userdata, uint8_t *p_buffer, int i_buffer )
if
(
psz
)
strncpy
(
(
char
*
)
p_buffer
,
psz
,
i_buffer
);
else
*
p_buffer
=
0
;
if
(
psz
)
free
(
psz
);
free
(
psz
);
return
0
;
}
...
...
@@ -248,11 +248,11 @@ static int Open( vlc_object_t *p_this )
var_Create
(
p_access
,
"realrtsp-caching"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
if
(
psz_server
)
free
(
psz_server
);
free
(
psz_server
);
return
VLC_SUCCESS
;
error:
if
(
psz_server
)
free
(
psz_server
);
free
(
psz_server
);
Close
(
p_this
);
return
VLC_EGENERIC
;
}
...
...
@@ -266,7 +266,7 @@ static void Close( vlc_object_t * p_this )
access_sys_t
*
p_sys
=
p_access
->
p_sys
;
if
(
p_sys
->
p_rtsp
)
rtsp_close
(
p_sys
->
p_rtsp
);
if
(
p_sys
->
p_rtsp
)
free
(
p_sys
->
p_rtsp
);
free
(
p_sys
->
p_rtsp
);
free
(
p_sys
);
}
...
...
modules/access/rtsp/real.c
View file @
9630c00c
...
...
@@ -480,7 +480,7 @@ rmff_header_t *real_parse_sdp(char *data, char **stream_rules, uint32_t bandwidt
if
(
!
desc
->
stream
[
i
]
->
mlti_data
)
{
len
=
0
;
if
(
buf
)
free
(
buf
);
free
(
buf
);
buf
=
NULL
;
}
else
len
=
select_mlti_data
(
desc
->
stream
[
i
]
->
mlti_data
,
...
...
@@ -531,13 +531,13 @@ rmff_header_t *real_parse_sdp(char *data, char **stream_rules, uint32_t bandwidt
rmff_fix_header
(
header
);
if
(
desc
)
sdpplin_free
(
desc
);
if
(
buf
)
free
(
buf
);
free
(
buf
);
return
header
;
error:
if
(
desc
)
sdpplin_free
(
desc
);
if
(
header
)
rmff_free_header
(
header
);
if
(
buf
)
free
(
buf
);
free
(
buf
);
return
NULL
;
}
...
...
@@ -642,10 +642,10 @@ rmff_header_t *real_setup_and_get_header(rtsp_client_t *rtsp_session, int bandw
lprintf
(
"real: got message from server:
\n
%s
\n
"
,
alert
);
}
printf
(
"bou
\n
"
);
rtsp_send_ok
(
rtsp_session
);
if
(
challenge1
)
free
(
challenge1
);
if
(
alert
)
free
(
alert
);
if
(
buf
)
free
(
buf
);
rtsp_send_ok
(
rtsp_session
);
free
(
challenge1
);
free
(
alert
);
free
(
buf
);
return
NULL
;
}
...
...
@@ -724,19 +724,19 @@ rmff_header_t *real_setup_and_get_header(rtsp_client_t *rtsp_session, int bandw
rtsp_schedule_field
(
rtsp_session
,
"Range: npt=0-"
);
rtsp_request_play
(
rtsp_session
,
NULL
);
if
(
challenge1
)
free
(
challenge1
);
if
(
session_id
)
free
(
session_id
);
if
(
description
)
free
(
description
);
if
(
subscribe
)
free
(
subscribe
);
if
(
buf
)
free
(
buf
);
free
(
challenge1
);
free
(
session_id
);
free
(
description
);
free
(
subscribe
);
free
(
buf
);
return
h
;
error:
if
(
h
)
rmff_free_header
(
h
);
if
(
challenge1
)
free
(
challenge1
);
if
(
session_id
)
free
(
session_id
);
if
(
description
)
free
(
description
);
if
(
subscribe
)
free
(
subscribe
);
if
(
buf
)
free
(
buf
);
free
(
challenge1
);
free
(
session_id
);
free
(
description
);
free
(
subscribe
);
free
(
buf
);
return
NULL
;
}
modules/access/rtsp/real_rmff.c
View file @
9630c00c
...
...
@@ -383,7 +383,7 @@ rmff_mdpr_t *rmff_new_mdpr(
mdpr
->
type_specific_data
=
malloc
(
sizeof
(
char
)
*
type_specific_len
);
if
(
!
mdpr
->
type_specific_data
)
{
if
(
mdpr
->
stream_name
)
free
(
mdpr
->
stream_name
);
free
(
mdpr
->
stream_name
);
free
(
mdpr
);
return
NULL
;
}
...
...
@@ -609,15 +609,15 @@ void rmff_free_header(rmff_header_t *h)
{
if
(
!
h
)
return
;
if
(
h
->
fileheader
)
free
(
h
->
fileheader
);
if
(
h
->
prop
)
free
(
h
->
prop
);
if
(
h
->
data
)
free
(
h
->
data
);
if
(
h
->
cont
)
{
free
(
h
->
cont
->
title
);
free
(
h
->
cont
->
author
);
free
(
h
->
cont
->
copyright
);
free
(
h
->
cont
->
comment
);
free
(
h
->
cont
);
free
(
h
->
fileheader
);
free
(
h
->
prop
);
free
(
h
->
data
);
if
(
h
->
cont
)
{
free
(
h
->
cont
->
title
);
free
(
h
->
cont
->
author
);
free
(
h
->
cont
->
copyright
);
free
(
h
->
cont
->
comment
);
free
(
h
->
cont
);
}
if
(
h
->
streams
)
{
rmff_mdpr_t
**
s
=
h
->
streams
;
...
...
modules/access/rtsp/real_sdpplin.c
View file @
9630c00c
...
...
@@ -209,14 +209,14 @@ static sdpplin_stream_t *sdpplin_parse_stream(char **data) {
*
data
=
nl
(
*
data
);
}
}
if
(
buf
)
free
(
buf
);
if
(
decoded
)
free
(
decoded
)
;
free
(
buf
);
free
(
decoded
)
;
return
desc
;
error:
if
(
decoded
)
free
(
decoded
);
if
(
desc
)
free
(
desc
);
if
(
buf
)
free
(
buf
);
free
(
decoded
);
free
(
desc
);
free
(
buf
);
return
NULL
;
}
...
...
@@ -312,8 +312,8 @@ sdpplin_t *sdpplin_parse(char *data) {
}
}
free
(
decoded
);
free
(
buf
);
free
(
decoded
);
free
(
buf
);
return
desc
;
}
...
...
@@ -325,36 +325,36 @@ void sdpplin_free(sdpplin_t *description) {
for
(
i
=
0
;
i
<
description
->
stream_count
;
i
++
)
{
if
(
description
->
stream
[
i
]
)
{
if
(
description
->
stream
[
i
]
->
id
)
free
(
description
->
stream
[
i
]
->
id
);
if
(
description
->
stream
[
i
]
->
bandwidth
)
free
(
description
->
stream
[
i
]
->
bandwidth
);
if
(
description
->
stream
[
i
]
->
range
)
free
(
description
->
stream
[
i
]
->
range
);
if
(
description
->
stream
[
i
]
->
length
)
free
(
description
->
stream
[
i
]
->
length
);
if
(
description
->
stream
[
i
]
->
rtpmap
)
free
(
description
->
stream
[
i
]
->
rtpmap
);
if
(
description
->
stream
[
i
]
->
mimetype
)
free
(
description
->
stream
[
i
]
->
mimetype
);
if
(
description
->
stream
[
i
]
->
stream_name
)
free
(
description
->
stream
[
i
]
->
stream_name
);
if
(
description
->
stream
[
i
]
->
mime_type
)
free
(
description
->
stream
[
i
]
->
mime_type
);
if
(
description
->
stream
[
i
]
->
mlti_data
)
free
(
description
->
stream
[
i
]
->
mlti_data
);
if
(
description
->
stream
[
i
]
->
rmff_flags
)
free
(
description
->
stream
[
i
]
->
rmff_flags
);
if
(
description
->
stream
[
i
]
->
asm_rule_book
)
free
(
description
->
stream
[
i
]
->
asm_rule_book
);
free
(
description
->
stream
[
i
]
->
id
);
free
(
description
->
stream
[
i
]
->
bandwidth
);
free
(
description
->
stream
[
i
]
->
range
);
free
(
description
->
stream
[
i
]
->
length
);
free
(
description
->
stream
[
i
]
->
rtpmap
);
free
(
description
->
stream
[
i
]
->
mimetype
);
free
(
description
->
stream
[
i
]
->
stream_name
);
free
(
description
->
stream
[
i
]
->
mime_type
);
free
(
description
->
stream
[
i
]
->
mlti_data
);
free
(
description
->
stream
[
i
]
->
rmff_flags
);
free
(
description
->
stream
[
i
]
->
asm_rule_book
);
free
(
description
->
stream
[
i
]
);
}
}
if
(
description
->
stream_count
)
free
(
description
->
stream
);
if
(
description
->
owner
)
free
(
description
->
owner
);
if
(
description
->
session_name
)
free
(
description
->
session_name
);
if
(
description
->
session_info
)
free
(
description
->
session_info
);
if
(
description
->
uri
)
free
(
description
->
uri
);
if
(
description
->
email
)
free
(
description
->
email
);
if
(
description
->
phone
)
free
(
description
->
phone
);
if
(
description
->
connection
)
free
(
description
->
connection
);
if
(
description
->
bandwidth
)
free
(
description
->
bandwidth
);
if
(
description
->
title
)
free
(
description
->
title
);
if
(
description
->
author
)
free
(
description
->
author
);
if
(
description
->
copyright
)
free
(
description
->
copyright
);
if
(
description
->
keywords
)
free
(
description
->
keywords
);
if
(
description
->
asm_rule_book
)
free
(
description
->
asm_rule_book
);
if
(
description
->
abstract
)
free
(
description
->
abstract
);
if
(
description
->
range
)
free
(
description
->
range
);
free
(
description
->
owner
);
free
(
description
->
session_name
);
free
(
description
->
session_info
);
free
(
description
->
uri
);
free
(
description
->
email
);
free
(
description
->
phone
);
free
(
description
->
connection
);
free
(
description
->
bandwidth
);
free
(
description
->
title
);
free
(
description
->
author
);
free
(
description
->
copyright
);
free
(
description
->
keywords
);
free
(
description
->
asm_rule_book
);
free
(
description
->
abstract
);
free
(
description
->
range
);
free
(
description
);
}
modules/access/rtsp/rtsp.c
View file @
9630c00c
...
...
@@ -240,7 +240,7 @@ static int rtsp_get_answers( rtsp_client_t *rtsp )
{
char
*
buf
=
malloc
(
strlen
(
answer
)
);
sscanf
(
answer
,
"%*s %s"
,
buf
);
if
(
rtsp
->
p_private
->
server
)
free
(
rtsp
->
p_private
->
server
);
free
(
rtsp
->
p_private
->
server
);
rtsp
->
p_private
->
server
=
buf
;
}
if
(
!
strncasecmp
(
answer
,
"Session:"
,
8
)
)
...
...
@@ -559,12 +559,12 @@ void rtsp_close( rtsp_client_t *rtsp )
rtsp
->
pf_disconnect
(
rtsp
->
p_userdata
);
}
if
(
rtsp
->
p_private
->
path
)
free
(
rtsp
->
p_private
->
path
);
if
(
rtsp
->
p_private
->
host
)
free
(
rtsp
->
p_private
->
host
);
if
(
rtsp
->
p_private
->
mrl
)
free
(
rtsp
->
p_private
->
mrl
);
if
(
rtsp
->
p_private
->
session
)
free
(
rtsp
->
p_private
->
session
);
if
(
rtsp
->
p_private
->
user_agent
)
free
(
rtsp
->
p_private
->
user_agent
);
if
(
rtsp
->
p_private
->
server
)
free
(
rtsp
->
p_private
->
server
);
free
(
rtsp
->
p_private
->
path
);
free
(
rtsp
->
p_private
->
host
);
free
(
rtsp
->
p_private
->
mrl
);
free
(
rtsp
->
p_private
->
session
);
free
(
rtsp
->
p_private
->
user_agent
);
free
(
rtsp
->
p_private
->
server
);
rtsp_free_answers
(
rtsp
);
rtsp_unschedule_all
(
rtsp
);
free
(
rtsp
->
p_private
);
...
...
@@ -604,7 +604,7 @@ char *rtsp_search_answers( rtsp_client_t *rtsp, const char *tag )
void
rtsp_set_session
(
rtsp_client_t
*
rtsp
,
const
char
*
id
)
{
if
(
rtsp
->
p_private
->
session
)
free
(
rtsp
->
p_private
->
session
);
free
(
rtsp
->
p_private
->
session
);
rtsp
->
p_private
->
session
=
strdup
(
id
);
}
...
...
@@ -647,7 +647,7 @@ void rtsp_unschedule_field( rtsp_client_t *rtsp, const char *string )
{
if
(
!
strncmp
(
*
ptr
,
string
,
strlen
(
string
))
)
break
;
}
if
(
*
ptr
)
free
(
*
ptr
);
free
(
*
ptr
);
ptr
++
;
do
{
...
...
modules/access/smb.c
View file @
9630c00c
...
...
@@ -188,11 +188,11 @@ static int Open( vlc_object_t *p_this )
* smb://[[[domain;]user[:password@]]server[/share[/path[/file]]]] */
if
(
!
psz_user
)
psz_user
=
var_CreateGetString
(
p_access
,
"smb-user"
);
if
(
psz_user
&&
!*
psz_user
)
{
free
(
psz_user
);
psz_user
=
0
;
}
if
(
!*
psz_user
)
{
free
(
psz_user
);
psz_user
=
0
;
}
if
(
!
psz_pwd
)
psz_pwd
=
var_CreateGetString
(
p_access
,
"smb-pwd"
);
if
(
psz_pwd
&&
!*
psz_pwd
)
{
free
(
psz_pwd
);
psz_pwd
=
0
;
}
if
(
!*
psz_pwd
)
{
free
(
psz_pwd
);
psz_pwd
=
0
;
}
if
(
!
psz_domain
)
psz_domain
=
var_CreateGetString
(
p_access
,
"smb-domain"
);
if
(
psz_domain
&&
!*
psz_domain
)
{
free
(
psz_domain
);
psz_domain
=
0
;
}
if
(
!*
psz_domain
)
{
free
(
psz_domain
);
psz_domain
=
0
;
}
#ifdef WIN32
if
(
psz_user
)
...
...
@@ -208,9 +208,9 @@ static int Open( vlc_object_t *p_this )
asprintf
(
&
psz_uri
,
"smb://%s"
,
psz_path
);
#endif
if
(
psz_user
)
free
(
psz_user
);
if
(
psz_pwd
)
free
(
psz_pwd
);
if
(
psz_domain
)
free
(
psz_domain
);
free
(
psz_user
);
free
(
psz_pwd
);
free
(
psz_domain
);
#ifdef USE_CTX
if
(
!
(
p_smb
=
smbc_new_context
())
)
...
...
modules/access/v4l.c
View file @
9630c00c
...
...
@@ -431,14 +431,14 @@ static int Open( vlc_object_t *p_this )
p_sys
->
fd_audio
=
OpenAudioDev
(
p_demux
,
p_sys
->
psz_device
);
if
(
p_sys
->
fd_audio
>=
0
)
{
if
(
p_sys
->
psz_adev
)
free
(
p_sys
->
psz_adev
);
free
(
p_sys
->
psz_adev
);
p_sys
->
psz_adev
=
p_sys
->
psz_device
;
p_sys
->
psz_device
=
NULL
;
}
}
else
{
if
(
p_sys
->
psz_vdev
)
free
(
p_sys
->
psz_vdev
);
free
(
p_sys
->
psz_vdev
);
p_sys
->
psz_vdev
=
p_sys
->
psz_device
;
p_sys
->
psz_device
=
NULL
;
}
...
...
@@ -459,7 +459,7 @@ static int Open( vlc_object_t *p_this )
{
if
(
!
p_sys
->
psz_vdev
||
!*
p_sys
->
psz_vdev
)
{
if
(
p_sys
->
psz_vdev
)
free
(
p_sys
->
psz_vdev
);
free
(
p_sys
->
psz_vdev
);
p_sys
->
psz_vdev
=
var_CreateGetString
(
p_demux
,
"v4l-vdev"
);;
}
...
...
@@ -474,7 +474,7 @@ static int Open( vlc_object_t *p_this )
{
if
(
!
p_sys
->
psz_adev
||
!*
p_sys
->
psz_adev
)
{
if
(
p_sys
->
psz_adev
)
free
(
p_sys
->
psz_adev
);
free
(
p_sys
->
psz_adev
);
p_sys
->
psz_adev
=
var_CreateGetString
(
p_demux
,
"v4l-adev"
);;
}
...
...
@@ -548,9 +548,9 @@ static void Close( vlc_object_t *p_this )
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
if
(
p_sys
->
psz_device
)
free
(
p_sys
->
psz_device
);
if
(
p_sys
->
psz_vdev
)
free
(
p_sys
->
psz_vdev
);
if
(
p_sys
->
psz_adev
)
free
(
p_sys
->
psz_adev
);
free
(
p_sys
->
psz_device
);
free
(
p_sys
->
psz_vdev
);
free
(
p_sys
->
psz_adev
);
if
(
p_sys
->
fd_video
>=
0
)
close
(
p_sys
->
fd_video
);
if
(
p_sys
->
fd_audio
>=
0
)
close
(
p_sys
->
fd_audio
);
if
(
p_sys
->
p_block_audio
)
block_Release
(
p_sys
->
p_block_audio
);
...
...
@@ -866,7 +866,7 @@ static void ParseMRL( demux_t *p_demux )
{
p_sys
->
psz_device
=
strdup
(
psz_dup
);
}
if
(
psz_dup
)
free
(
psz_dup
);
free
(
psz_dup
);
}
/*****************************************************************************
...
...
modules/access/v4l2/v4l2.c
View file @
9630c00c
...
...
@@ -610,7 +610,7 @@ static int FindMainDevice( vlc_object_t *p_this, demux_sys_t *p_sys,
{
msg_Dbg
(
p_this
,
"'%s' is a video device"
,
p_sys
->
psz_device
);
/* Device was a video device */
if
(
p_sys
->
psz_vdev
)
free
(
p_sys
->
psz_vdev
);
free
(
p_sys
->
psz_vdev
);
p_sys
->
psz_vdev
=
p_sys
->
psz_device
;
p_sys
->
psz_device
=
NULL
;
p_sys
->
i_fd_video
=
OpenVideoDev
(
p_this
,
p_sys
,
b_demux
);
...
...
@@ -653,7 +653,7 @@ static int FindMainDevice( vlc_object_t *p_this, demux_sys_t *p_sys,
{
if
(
!
p_sys
->
psz_vdev
||
!*
p_sys
->
psz_vdev
)
{
if
(
p_sys
->
psz_vdev
)
free
(
p_sys
->
psz_vdev
);
free
(
p_sys
->
psz_vdev
);
p_sys
->
psz_vdev
=
var_CreateGetString
(
p_this
,
"v4l2-dev"
);
}
...
...
@@ -862,7 +862,7 @@ static void ParseMRL( demux_sys_t *p_sys, char *psz_path, vlc_object_t *p_obj )
i_len
=
strlen
(
psz_parser
);
}
if
(
p_sys
->
psz_requested_chroma
)
free
(
p_sys
->
psz_requested_chroma
);
free
(
p_sys
->
psz_requested_chroma
);
p_sys
->
psz_requested_chroma
=
strndup
(
psz_parser
,
i_len
);
psz_parser
+=
i_len
;
...
...
@@ -1053,7 +1053,7 @@ static void ParseMRL( demux_sys_t *p_sys, char *psz_path, vlc_object_t *p_obj )
{
p_sys
->
psz_device
=
strdup
(
psz_dup
);
}
if
(
psz_dup
)
free
(
psz_dup
);
free
(
psz_dup
);
}
/*****************************************************************************
...
...
modules/access/vcd/cdrom.c
View file @
9630c00c
...
...
@@ -162,7 +162,7 @@ vcddev_t *ioctl_Open( vlc_object_t *p_this, const char *psz_dev )
*****************************************************************************/
void
ioctl_Close
(
vlc_object_t
*
p_this
,
vcddev_t
*
p_vcddev
)
{
if
(
p_vcddev
->
psz_dev
)
free
(
p_vcddev
->
psz_dev
);
free
(
p_vcddev
->
psz_dev
);
if
(
p_vcddev
->
i_vcdimage_handle
!=
-
1
)
{
...
...
@@ -358,8 +358,8 @@ int ioctl_GetTracksMap( vlc_object_t *p_this, const vcddev_t *p_vcddev,
if
(
*
pp_sectors
==
NULL
||
p_fulltoc
==
NULL
)
{
if
(
*
pp_sectors
)
free
(
*
pp_sectors
);
if
(
p_fulltoc
)
free
(
p_fulltoc
);
free
(
*
pp_sectors
);
free
(
p_fulltoc
);
msg_Err
(
p_this
,
"out of memory"
);
CloseHandle
(
hEvent
);
return
0
;
...
...
@@ -972,8 +972,8 @@ static int OpenVCDImage( vlc_object_t * p_this, const char *psz_dev,
error:
if
(
cuefile
)
fclose
(
cuefile
);
if
(
psz_cuefile
)
free
(
psz_cuefile
);
if
(
psz_vcdfile
)
free
(
psz_vcdfile
);
free
(
psz_cuefile
);
free
(
psz_vcdfile
);
return
i_ret
;
}
...
...
@@ -988,8 +988,7 @@ static void CloseVCDImage( vlc_object_t * p_this, vcddev_t *p_vcddev )
else
return
;
if
(
p_vcddev
->
p_sectors
)
free
(
p_vcddev
->
p_sectors
);
free
(
p_vcddev
->
p_sectors
);
}
#if defined( __APPLE__ )
...
...
modules/audio_filter/normvol.c
View file @
9630c00c
...
...
@@ -243,7 +243,7 @@ static void Close( vlc_object_t *p_this )
if
(
p_sys
)
{
if
(
p_sys
->
p_last
)
free
(
p_sys
->
p_last
);
free
(
p_sys
->
p_last
);
free
(
p_sys
);
}
}
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