server: Fix use after free in add_committed_range (scan-build).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3b2937f7c7
commit
f3c9fdf852
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue