Commit f3c9fdf8 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

server: Fix use after free in add_committed_range (scan-build).

parent 3b2937f7
......@@ -404,7 +404,7 @@ static void add_committed_range( struct memory_view *view, file_pos_t start, fil
struct range *new_ptr = realloc( committed->ranges, new_size * sizeof(*new_ptr) );
if (!new_ptr) return;
committed->max = new_size;
committed->ranges = new_ptr;
ranges = committed->ranges = new_ptr;
}
memmove( &ranges[i + 1], &ranges[i], (committed->count - i) * sizeof(*ranges) );
ranges[i].start = start;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment