Commit 7a3df4d0 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

server: Free ptr in console_input_append_hist.

Free ptr in console_input_append_hist before returning, otherwise it will be leaked (found by Coverity). Remove the setting of last error on mem_alloc failure, as it is already done in mem_alloc.
parent 0bf1c22c
......@@ -897,13 +897,12 @@ static void console_input_append_hist( struct console_input* console, const WCHA
WCHAR* ptr = mem_alloc( (len + 1) * sizeof(WCHAR) );
if (!ptr)
{
set_error( STATUS_NO_MEMORY );
return;
}
if (!console || !console->history_size)
{
set_error( STATUS_INVALID_PARAMETER ); /* FIXME */
free( ptr );
return;
}
......
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