server: Handle error when memdup fails in synthesize_formats.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sebastian Lackner 2016-09-30 03:41:38 +02:00 committed by Alexandre Julliard
parent b593391628
commit b6b54fa14a
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ static int synthesize_formats( struct clipboard *clipboard )
(HAS_FORMAT( map, CF_TEXT ) || HAS_FORMAT( map, CF_OEMTEXT ) || HAS_FORMAT( map, CF_UNICODETEXT )))
{
void *data = memdup( &clipboard->lcid, sizeof(clipboard->lcid) );
if ((format = add_format( clipboard, CF_LOCALE )))
if (data && (format = add_format( clipboard, CF_LOCALE )))
{
format->seqno = clipboard->seqno++;
format->data = data;