diff --git a/client/X11/xfreerdp.c b/client/X11/xfreerdp.c index 30a231071..28bc33134 100644 --- a/client/X11/xfreerdp.c +++ b/client/X11/xfreerdp.c @@ -888,16 +888,11 @@ void xf_window_free(xfInfo* xfi) if (context != NULL) { - if (context->cache != NULL) - { cache_free(context->cache); context->cache = NULL; - } - if (context->rail != NULL) - { + rail_free(context->rail); context->rail = NULL; - } } if (xfi->rfx_context) @@ -917,8 +912,7 @@ void xf_free(xfInfo* xfi) { xf_window_free(xfi); - if (xfi->bmp_codec_none != NULL) - xfree(xfi->bmp_codec_none); + xfree(xfi->bmp_codec_none); XCloseDisplay(xfi->display); diff --git a/libfreerdp-utils/memory.c b/libfreerdp-utils/memory.c index 1a4ff6c57..2e2a11a17 100644 --- a/libfreerdp-utils/memory.c +++ b/libfreerdp-utils/memory.c @@ -103,7 +103,6 @@ void* xrealloc(void* ptr, size_t size) void xfree(void* ptr) { - if (ptr != NULL) free(ptr); }