Fixed use after free.
authorArmin Novak <armin.novak@thincast.com>
Thu, 6 Oct 2016 11:04:06 +0000 (13:04 +0200)
committerArmin Novak <armin.novak@thincast.com>
Thu, 6 Oct 2016 11:43:15 +0000 (13:43 +0200)
channels/rdpsnd/client/rdpsnd_main.c

index f5f7a03..90e2d63 100644 (file)
@@ -1447,10 +1447,11 @@ static VOID VCAPITYPE rdpsnd_virtual_channel_init_event(LPVOID pInitHandle,
                                                 "rdpsnd_virtual_channel_event_disconnected failed with error %lu!", error);
 
                        rdpsnd_virtual_channel_event_terminated(plugin);
+                       plugin = NULL;
                        break;
        }
 
-       if (error && plugin->rdpcontext)
+       if (error && plugin && plugin->rdpcontext)
                setChannelError(plugin->rdpcontext, error,
                                "rdpsnd_virtual_channel_init_event reported an error");
 }