diff options
-rw-r--r-- | src/XrrMonitor.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/XrrMonitor.c b/src/XrrMonitor.c index 71d3943..a9eaa7b 100644 --- a/src/XrrMonitor.c +++ b/src/XrrMonitor.c @@ -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); } |