Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
e97f38ce
Commit
e97f38ce
authored
Oct 08, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffserver: use av_freep(), do not leave stale pointers in memory
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
b530e2e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
ffserver.c
ffserver.c
+10
-10
No files found.
ffserver.c
View file @
e97f38ce
...
...
@@ -865,7 +865,7 @@ static void new_connection(int server_fd, int is_rtsp)
fail
:
if
(
c
)
{
av_free
(
c
->
buffer
);
av_free
p
(
&
c
->
buffer
);
av_free
(
c
);
}
closesocket
(
fd
);
...
...
@@ -918,8 +918,8 @@ static void close_connection(HTTPContext *c)
if
(
ctx
)
{
av_write_trailer
(
ctx
);
av_dict_free
(
&
ctx
->
metadata
);
av_free
(
ctx
->
streams
[
0
]);
av_free
(
ctx
);
av_free
p
(
&
ctx
->
streams
[
0
]);
av_free
p
(
&
ctx
);
}
h
=
c
->
rtp_handles
[
i
];
if
(
h
)
...
...
@@ -940,7 +940,7 @@ static void close_connection(HTTPContext *c)
}
for
(
i
=
0
;
i
<
ctx
->
nb_streams
;
i
++
)
av_free
(
ctx
->
streams
[
i
]);
av_free
p
(
&
ctx
->
streams
[
i
]);
av_freep
(
&
ctx
->
streams
);
av_freep
(
&
ctx
->
priv_data
);
...
...
@@ -955,7 +955,7 @@ static void close_connection(HTTPContext *c)
av_freep
(
&
c
->
pb_buffer
);
av_freep
(
&
c
->
packet_buffer
);
av_free
(
c
->
buffer
);
av_free
p
(
&
c
->
buffer
);
av_free
(
c
);
nb_connections
--
;
}
...
...
@@ -2800,14 +2800,14 @@ static int http_receive_data(HTTPContext *c)
s
->
pb
=
pb
;
if
(
avformat_open_input
(
&
s
,
c
->
stream
->
feed_filename
,
fmt_in
,
NULL
)
<
0
)
{
av_free
(
pb
);
av_free
p
(
&
pb
);
goto
fail
;
}
/* Now we have the actual streams */
if
(
s
->
nb_streams
!=
feed
->
nb_streams
)
{
avformat_close_input
(
&
s
);
av_free
(
pb
);
av_free
p
(
&
pb
);
http_log
(
"Feed '%s' stream number does not match registered feed
\n
"
,
c
->
stream
->
feed_filename
);
goto
fail
;
...
...
@@ -2820,7 +2820,7 @@ static int http_receive_data(HTTPContext *c)
}
avformat_close_input
(
&
s
);
av_free
(
pb
);
av_free
p
(
&
pb
);
}
c
->
buffer_ptr
=
c
->
buffer
;
}
...
...
@@ -2999,7 +2999,7 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
av_sdp_create
(
&
avc
,
1
,
*
pbuffer
,
2048
);
sdp_done:
av_free
(
avc
->
streams
);
av_free
p
(
&
avc
->
streams
);
av_dict_free
(
&
avc
->
metadata
);
av_free
(
avc
);
av_free
(
avs
);
...
...
@@ -3386,7 +3386,7 @@ static HTTPContext *rtp_new_connection(struct sockaddr_in *from_addr,
fail:
if
(
c
)
{
av_free
(
c
->
buffer
);
av_free
p
(
&
c
->
buffer
);
av_free
(
c
);
}
return
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