Commit 568e90ad authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

win32u: Avoid leaking previous buffer in get_buffer_space().

parent 054a95a8
......@@ -473,7 +473,10 @@ static inline void *get_buffer_space( void **buffer, size_t size, size_t *buffer
{
if (*buffer_size < size)
{
*buffer = malloc( size );
void *new;
if (!(new = realloc( *buffer, size ))) return NULL;
*buffer = new;
*buffer_size = size;
}
return *buffer;
......
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