Fix stack freeing error in common
This commit is contained in:
parent
cc014425c4
commit
531a1d6814
|
@ -247,7 +247,8 @@ enum socket_read_result get_all_remote_parts(int socket_fd, enum socket_type typ
|
|||
body_result = read_body_by_content_length(socket_fd, net_content_length);
|
||||
} else if (read_info.strategy == STRATEGY_EOF && type == TYPE_SERVER) {
|
||||
// Servers cannot just wait for EOF with a client, so we just skip the action.
|
||||
body_result = "\0";
|
||||
body_result = malloc(1 * sizeof(char));
|
||||
*body_result = '\0';
|
||||
} else {
|
||||
// In all other cases, such as if we have EOF strategy on a client.
|
||||
body_result = read_body_until_eof(socket_fd);
|
||||
|
|
Loading…
Reference in a new issue