x11: don't return freed memory from get_clipboard
x11: don't return freed memory from get_clipboard

There is a double free in client/x11/platform.cpp.
In get_selection(), in the exit: case with ret_val == -1 and data != NULL,
*data_ret (which is returned to the caller) has already been
assigned "data", so it will be pointing to freed memory when "data" is
XFree'd'. Then in handle_selection_notify, get_selection_free is called on
this pointer, which causes a double free.
When the length of the read data = 0, set the returned value to NULL,
this way subsequent free attempts will be a noop.
Fixes RH bug #710461

freedesktop-unofficial-mirror/spice__spice,ya-mouse/spice,Fantu/spice,fgouget/spice,freedesktop-unofficial-mirror/spice__spice,freedesktop-unofficial-mirror/spice__spice,SPICE/spice,alon/spice-server,fgouget/spice,dezelin/spice,Fantu/spice,mathslinux/spice,dezelin/spice,alon/spice-server,fgouget/spice,alon/spice-server,dezelin/spice,SPICE/spice,alon/spice-server,Fantu/spice,Fantu/spice,elmarco/spice,alon/spice-server,mathslinux/spice,elmarco/spice,dezelin/spice,mathslinux/spice,ya-mouse/spice,ya-mouse/spice,SPICE/spice,mathslinux/spice,elmarco/spice,elmarco/spice,freedesktop-unofficial-mirror/spice__spice,mathslinux/spice,freedesktop-unofficial-mirror/spice__spice,dezelin/spice,fgouget/spice,elmarco/spice