1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

win32u: Avoid leaking previous buffer in get_buffer_space().

This commit is contained in:
Paul Gofman 2024-03-22 21:46:31 -06:00 committed by Alexandre Julliard
parent 054a95a817
commit 568e90ad11

View file

@ -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;