mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine autofree, only free object, never free arrays
This commit is contained in:
parent
300f264e92
commit
dc66c525fd
17 changed files with 160 additions and 155 deletions
|
@ -228,7 +228,7 @@ int SrsHttpVhost::do_process_request(SrsSocket* skt, SrsHttpMessage* req)
|
|||
::lseek(fd, 0, SEEK_SET);
|
||||
|
||||
char* buf = new char[length];
|
||||
SrsAutoFree(char, buf, true);
|
||||
SrsAutoFree(char, buf);
|
||||
|
||||
// TODO: FIXME: use st_read.
|
||||
if (::read(fd, buf, length) < 0) {
|
||||
|
@ -352,7 +352,7 @@ int SrsHttpConn::do_cycle()
|
|||
srs_assert(req->is_complete());
|
||||
|
||||
// always free it in this scope.
|
||||
SrsAutoFree(SrsHttpMessage, req, false);
|
||||
SrsAutoFree(SrsHttpMessage, req);
|
||||
|
||||
// ok, handle http request.
|
||||
if ((ret = process_request(&skt, req)) != ERROR_SUCCESS) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue