diff --git a/src/ngx_stream_upsync_module.c b/src/ngx_stream_upsync_module.c index 5e71b11..59a345a 100644 --- a/src/ngx_stream_upsync_module.c +++ b/src/ngx_stream_upsync_module.c @@ -3669,6 +3669,7 @@ ngx_stream_client_recv(ngx_stream_conf_client *client, char **data, int size) *data = (char *) ngx_calloc(page_count * ngx_pagesize, ngx_cycle->log); if (*data == NULL) { + ngx_free(tmp_data); return NGX_ERROR; } ngx_memcpy(*data, tmp_data, recv_num - tmp_recv);