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
5cb4066e
Commit
5cb4066e
authored
Mar 14, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Useless test before a free()
parent
ac5fe543
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
23 additions
and
48 deletions
+23
-48
modules/access/mms/buffer.c
modules/access/mms/buffer.c
+2
-8
modules/access/mms/mmsh.c
modules/access/mms/mmsh.c
+2
-4
modules/access/mms/mmstu.c
modules/access/mms/mmstu.c
+1
-4
modules/access/pvr.c
modules/access/pvr.c
+3
-6
modules/access/rtsp/real_asmrp.c
modules/access/rtsp/real_asmrp.c
+2
-2
modules/audio_output/jack.c
modules/audio_output/jack.c
+3
-12
modules/codec/cc.c
modules/codec/cc.c
+2
-4
modules/codec/cmml/xtag.c
modules/codec/cmml/xtag.c
+5
-5
modules/codec/faad.c
modules/codec/faad.c
+1
-1
modules/codec/fake.c
modules/codec/fake.c
+2
-2
No files found.
modules/access/mms/buffer.c
View file @
5cb4066e
...
...
@@ -54,10 +54,7 @@ int var_buffer_reinitwrite( var_buffer_t *p_buf, int i_default_size )
if
(
p_buf
->
i_size
<
i_default_size
)
{
p_buf
->
i_size
=
i_default_size
;
if
(
p_buf
->
p_data
)
{
free
(
p_buf
->
p_data
);
}
free
(
p_buf
->
p_data
);
p_buf
->
p_data
=
malloc
(
p_buf
->
i_size
);
}
if
(
!
p_buf
->
p_data
)
...
...
@@ -151,10 +148,7 @@ void var_buffer_addUTF16( var_buffer_t *p_buf, const char *p_str )
void
var_buffer_free
(
var_buffer_t
*
p_buf
)
{
if
(
p_buf
->
p_data
)
{
free
(
p_buf
->
p_data
);
}
free
(
p_buf
->
p_data
);
p_buf
->
i_data
=
0
;
p_buf
->
i_size
=
0
;
}
...
...
modules/access/mms/mmsh.c
View file @
5cb4066e
...
...
@@ -226,8 +226,7 @@ void E_( MMSHClose )( access_t *p_access )
Stop
(
p_access
);
if
(
p_sys
->
p_header
)
free
(
p_sys
->
p_header
);
free
(
p_sys
->
p_header
);
vlc_UrlClean
(
&
p_sys
->
proxy
);
vlc_UrlClean
(
&
p_sys
->
url
);
...
...
@@ -732,8 +731,7 @@ static void GetHeader( access_t *p_access )
/* Read the asf header */
p_sys
->
i_header
=
0
;
if
(
p_sys
->
p_header
)
free
(
p_sys
->
p_header
);
free
(
p_sys
->
p_header
);
p_sys
->
p_header
=
NULL
;
for
(
;;
)
{
...
...
modules/access/mms/mmstu.c
View file @
5cb4066e
...
...
@@ -1099,10 +1099,7 @@ static int mms_ParseCommand( access_t *p_access,
int
i_length
;
uint32_t
i_id
;
if
(
p_sys
->
p_cmd
)
{
free
(
p_sys
->
p_cmd
);
}
free
(
p_sys
->
p_cmd
);
p_sys
->
i_cmd
=
i_data
;
p_sys
->
p_cmd
=
malloc
(
i_data
);
memcpy
(
p_sys
->
p_cmd
,
p_data
,
i_data
);
...
...
modules/access/pvr.c
View file @
5cb4066e
...
...
@@ -826,8 +826,7 @@ static int Open( vlc_object_t * p_this )
if
(
psz_device
)
{
if
(
p_sys
->
psz_videodev
)
free
(
p_sys
->
psz_videodev
);
free
(
p_sys
->
psz_videodev
);
p_sys
->
psz_videodev
=
psz_device
;
}
...
...
@@ -1061,10 +1060,8 @@ static void Close( vlc_object_t * p_this )
close
(
p_sys
->
i_fd
);
if
(
p_sys
->
i_radio_fd
!=
-
1
)
close
(
p_sys
->
i_radio_fd
);
if
(
p_sys
->
psz_videodev
)
free
(
p_sys
->
psz_videodev
);
if
(
p_sys
->
psz_radiodev
)
free
(
p_sys
->
psz_radiodev
);
free
(
p_sys
->
psz_videodev
);
free
(
p_sys
->
psz_radiodev
);
free
(
p_sys
);
}
...
...
modules/access/rtsp/real_asmrp.c
View file @
5cb4066e
...
...
@@ -106,8 +106,8 @@ static void asmrp_dispose (asmrp_t *p) {
for
(
i
=
0
;
i
<
p
->
sym_tab_num
;
i
++
)
free
(
p
->
sym_tab
[
i
].
id
);
if
(
p
->
buf
)
free
(
p
->
buf
);
free
(
p
);
free
(
p
->
buf
);
free
(
p
);
}
static
void
asmrp_getch
(
asmrp_t
*
p
)
{
...
...
modules/audio_output/jack.c
View file @
5cb4066e
...
...
@@ -214,10 +214,7 @@ static int Open( vlc_object_t *p_this )
psz_out
,
psz_in
);
}
}
if
(
pp_in_ports
)
{
free
(
pp_in_ports
);
}
free
(
pp_in_ports
);
}
msg_Dbg
(
p_aout
,
"JACK audio output initialized (%d channels, buffer "
...
...
@@ -233,14 +230,8 @@ error_out:
jack_deactivate
(
p_sys
->
p_jack_client
);
jack_client_close
(
p_sys
->
p_jack_client
);
}
if
(
p_sys
->
p_jack_ports
)
{
free
(
p_sys
->
p_jack_ports
);
}
if
(
p_sys
->
p_jack_buffers
)
{
free
(
p_sys
->
p_jack_buffers
);
}
free
(
p_sys
->
p_jack_ports
);
free
(
p_sys
->
p_jack_buffers
);
free
(
p_sys
);
}
return
status
;
...
...
modules/codec/cc.c
View file @
5cb4066e
...
...
@@ -334,8 +334,7 @@ static subpicture_t *Subtitle( decoder_t *p_dec, char *psz_subtitle, char *psz_h
{
msg_Warn
(
p_dec
,
"can't get spu buffer"
);
free
(
psz_subtitle
);
if
(
psz_html
)
free
(
psz_html
);
free
(
psz_html
);
return
NULL
;
}
...
...
@@ -352,8 +351,7 @@ static subpicture_t *Subtitle( decoder_t *p_dec, char *psz_subtitle, char *psz_h
{
msg_Err
(
p_dec
,
"cannot allocate SPU region"
);
free
(
psz_subtitle
);
if
(
psz_html
)
free
(
psz_html
);
free
(
psz_html
);
p_dec
->
pf_spu_buffer_del
(
p_dec
,
p_spu
);
return
NULL
;
}
...
...
modules/codec/cmml/xtag.c
View file @
5cb4066e
...
...
@@ -421,14 +421,14 @@ xtag_free (XTag * xtag)
if
(
xtag
==
NULL
)
return
NULL
;
if
(
xtag
->
name
)
free
(
xtag
->
name
);
if
(
xtag
->
pcdata
)
free
(
xtag
->
pcdata
);
free
(
xtag
->
name
);
free
(
xtag
->
pcdata
);
for
(
l
=
xtag
->
attributes
;
l
;
l
=
l
->
next
)
{
if
((
attr
=
(
XAttribute
*
)
l
->
data
)
!=
NULL
)
{
if
(
attr
->
name
)
free
(
attr
->
name
);
if
(
attr
->
value
)
free
(
attr
->
value
);
free
(
attr
);
free
(
attr
->
name
);
free
(
attr
->
value
);
free
(
attr
);
}
}
xlist_free
(
xtag
->
attributes
);
...
...
modules/codec/faad.c
View file @
5cb4066e
...
...
@@ -434,7 +434,7 @@ static void Close( vlc_object_t *p_this )
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
faacDecClose
(
p_sys
->
hfaad
);
if
(
p_sys
->
p_buffer
)
free
(
p_sys
->
p_buffer
);
free
(
p_sys
->
p_buffer
);
free
(
p_sys
);
}
...
...
modules/codec/fake.c
View file @
5cb4066e
...
...
@@ -225,7 +225,7 @@ static int OpenDecoder( vlc_object_t *p_this )
}
msg_Dbg
(
p_dec
,
"file %s loaded successfully"
,
psz_file
);
if
(
psz_file
)
free
(
psz_file
);
free
(
psz_file
);
if
(
b_keep_ar
)
{
...
...
@@ -304,7 +304,7 @@ static int OpenDecoder( vlc_object_t *p_this )
p_handler
=
image_HandlerCreate
(
p_dec
);
p_image
=
image_Filter
(
p_handler
,
p_old
,
&
fmt_out
,
val
.
psz_string
);
image_HandlerDelete
(
p_handler
);
if
(
val
.
psz_string
!=
NULL
)
free
(
val
.
psz_string
);
free
(
val
.
psz_string
);
if
(
p_image
==
NULL
)
{
...
...
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