Applied patch from bug #1431217: Segmentation fault in xclip_handle_SelectionNotify.

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1047 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Peter Åstrand 2006-02-28 08:09:41 +00:00
parent 67fff0767c
commit ced8a62080

View File

@ -385,7 +385,7 @@ xclip_handle_SelectionNotify(XSelectionEvent * event)
Atom type;
Atom *supported_targets;
int res, i, format;
uint8 *data;
uint8 *data = NULL;
if (event->property == None)
goto fail;
@ -503,7 +503,8 @@ xclip_handle_SelectionNotify(XSelectionEvent * event)
fail:
XDeleteProperty(g_display, g_wnd, rdesktop_clipboard_target_atom);
XFree(data);
if (data)
XFree(data);
helper_cliprdr_send_empty_response();
}