Commit ba3e2abc authored by Alexandre Julliard's avatar Alexandre Julliard

Small optimization.

parent ce686031
...@@ -58,8 +58,9 @@ void *mem_alloc( size_t size ) ...@@ -58,8 +58,9 @@ void *mem_alloc( size_t size )
/* duplicate a block of memory */ /* duplicate a block of memory */
void *memdup( const void *data, size_t len ) void *memdup( const void *data, size_t len )
{ {
void *ptr = mem_alloc( len ); void *ptr = malloc( len );
if (ptr) memcpy( ptr, data, len ); if (ptr) memcpy( ptr, data, len );
else if (current) set_error( STATUS_NO_MEMORY );
return ptr; return ptr;
} }
......
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