diff options
author | walter harms <wharms@bfs.de> | 2016-07-28 19:31:10 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2016-08-15 08:55:06 +0200 |
commit | 4ed36e386b21c1a65d614d5bf2b2c82d1e74ae2e (patch) | |
tree | 43a288689d2c3cbc9ea8d388e051367ad563db2c | |
parent | 4437436906cbba5121115e552d564262e8b4c784 (diff) |
fix: doGetScreenResources() info: redundant null check on calling free()
janitorial patch: remove some unneeded if() before free()
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r-- | src/XrrScreen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/XrrScreen.c b/src/XrrScreen.c index f29071c..b8ce7e5 100644 --- a/src/XrrScreen.c +++ b/src/XrrScreen.c @@ -127,8 +127,8 @@ doGetScreenResources (Display *dpy, Window window, int poll) xrsr = (XRRScreenResources *) Xmalloc(rbytes); wire_names = (char *) Xmalloc (rep.nbytesNames); if (xrsr == NULL || wire_names == NULL) { - if (xrsr) Xfree (xrsr); - if (wire_names) Xfree (wire_names); + Xfree (xrsr); + Xfree (wire_names); _XEatDataWords (dpy, rep.length); UnlockDisplay (dpy); SyncHandle (); |