diff options
Diffstat (limited to 'src/daemon')
-rw-r--r-- | src/daemon/connection.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/daemon/connection.c b/src/daemon/connection.c index d99a88c2..03875559 100644 --- a/src/daemon/connection.c +++ b/src/daemon/connection.c | |||
@@ -927,10 +927,11 @@ MHD_call_connection_handler (struct MHD_Connection *connection) | |||
927 | (connection->uploadSize == -1) && (connection->socket_fd == -1))) | 927 | (connection->uploadSize == -1) && (connection->socket_fd == -1))) |
928 | { | 928 | { |
929 | connection->bodyReceived = 1; | 929 | connection->bodyReceived = 1; |
930 | MHD_pool_reallocate(connection->pool, | 930 | if (connection->read_buffer != NULL) |
931 | (connection->read_buffer == NULL) ? 0 : connection->read_buffer_size + 1, | 931 | MHD_pool_reallocate(connection->pool, |
932 | connection->read_buffer_size, | 932 | connection->read_buffer, |
933 | 0); | 933 | (connection->read_buffer == NULL) ? 0 : connection->read_buffer_size + 1, |
934 | 0); | ||
934 | connection->readLoc = 0; | 935 | connection->readLoc = 0; |
935 | connection->read_buffer_size = 0; | 936 | connection->read_buffer_size = 0; |
936 | connection->read_buffer = NULL; | 937 | connection->read_buffer = NULL; |