ack (I am really scared by this conditional free there!! it's a recipe for disasters)
On Wed, May 8, 2013 at 4:06 PM, Yonit Halperin <yhalperi@xxxxxxxxxx> wrote:
---
server/reds.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/server/reds.c b/server/reds.c
index a378f80..f6a1ce9 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -196,10 +196,9 @@ static void reds_stream_push_channel_event(RedsStream *s, int event)
void reds_handle_channel_event(int event, SpiceChannelEventInfo *info)
{
- if (core->base.minor_version < 3 || core->channel_event == NULL)
- return;
+ if (core->base.minor_version >= 3 && core->channel_event != NULL)
+ core->channel_event(event, info);
- core->channel_event(event, info);
if (event == SPICE_CHANNEL_EVENT_DISCONNECTED) {
free(info);
}
--
1.8.1.4
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel
--
Marc-André Lureau
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel