Commit 8ac94020 authored by Walter Harms's avatar Walter Harms Committed by Hans de Goede

fix: redundant null check on calling free()

janitorial patch: remove some unneeded if() before free()
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 4ed36e38
......@@ -84,8 +84,8 @@ XRRGetMonitors(Display *dpy, Window window, Bool get_active, int *nmonitors)
mon = Xmalloc (rbytes);
if (buf == NULL || mon == NULL) {
if (buf != NULL) Xfree(buf);
if (mon != NULL) Xfree(mon);
Xfree(buf);
Xfree(mon);
_XEatDataWords (dpy, rep.length);
UnlockDisplay (dpy);
SyncHandle ();
......@@ -194,7 +194,6 @@ XRRAllocateMonitor(Display *dpy, int noutput)
void
XRRFreeMonitors(XRRMonitorInfo *monitors)
{
if (monitors)
Xfree(monitors);
Xfree(monitors);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment