void-packages/srcpkgs/alttab/patches/0002-Remove-check-around-free.patch
Nathan Owens fd45c92d98 alttab: Add memleaks patch
Signed-off-by: Nathan Owens <ndowens04@gmail.com>
2019-12-03 13:20:27 +01:00

28 lines
724 B
Diff

From f7e8ff30190a3134863d7ff03becc2e397ec9db0 Mon Sep 17 00:00:00 2001
From: Michael Vetter <jubalh@iodoru.org>
Date: Thu, 3 Oct 2019 17:20:40 +0200
Subject: [PATCH] Remove check around free()
free(NULL) is noop. We don't need to check for this.
---
src/randr.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/randr.c b/src/randr.c
index e4ebe9d..0622c73 100644
--- src/randr.c
+++ src/randr.c
@@ -186,8 +186,7 @@ bool randrGetViewport(quad * res, bool * multihead)
if (no < 1) {
msg(0, "randr didn't detect any output\n");
*multihead = false;
- if (oq != NULL)
- free(oq);
+ free(oq);
return false;
}
if (no == 1) {
--
2.24.0