xfreerdp: fix segfault
authorBernhard Miklautz <bernhard.miklautz@thincast.com>
Thu, 11 Sep 2014 15:04:21 +0000 (17:04 +0200)
committerBernhard Miklautz <bernhard.miklautz@thincast.com>
Thu, 11 Sep 2014 15:04:21 +0000 (17:04 +0200)
codec contexts are now generated and freed within core/codecs.c

client/X11/xf_client.c

index e1f3d99..81e6f51 100644 (file)
@@ -863,16 +863,6 @@ BOOL xf_post_connect(freerdp *instance)
                xfc->srcBpp = settings->ColorDepth;
                xf_gdi_register_update_callbacks(instance->update);
                xfc->hdc = gdi_CreateDC(xfc->clrconv, xfc->bpp);
-
-               if (settings->RemoteFxCodec)
-               {
-                       xfc->codecs->rfx = rfx_context_new(FALSE);
-               }
-
-               if (settings->NSCodec)
-               {
-                       xfc->codecs->nsc = nsc_context_new();
-               }
        }
 
        xfc->originalWidth = settings->DesktopWidth;
@@ -1108,24 +1098,6 @@ void xf_window_free(xfContext *xfc)
                context->rail = NULL;
        }
 
-       if (xfc->codecs->rfx)
-       {
-               rfx_context_free(xfc->codecs->rfx);
-               xfc->codecs->rfx = NULL;
-       }
-
-       if (xfc->codecs->nsc)
-       {
-               nsc_context_free(xfc->codecs->nsc);
-               xfc->codecs->nsc = NULL;
-       }
-
-       if (xfc->codecs->clear)
-       {
-               clear_context_free(xfc->codecs->clear);
-               xfc->codecs->clear = NULL;
-       }
-
        if (xfc->clrconv)
        {
                freerdp_clrconv_free(xfc->clrconv);