summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Wiederhake <twied@gmx.net>2024-01-01 12:22:46 +0100
committerTim Wiederhake <twied@gmx.net>2024-01-01 12:22:46 +0100
commit3cd3dd5b0b7cfe3888ae6f805a8f4c59f034834e (patch)
tree77521f24af9630e79aa8a22b2b9af6364473afff
parentbaec4a82269adb3b07e5f60f410f104150331dbf (diff)
Silence uninitialized variable warning
Signed-off-by: Tim Wiederhake <twied@gmx.net>
-rw-r--r--src/add_window.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/add_window.c b/src/add_window.c
index 3895729..39a9325 100644
--- a/src/add_window.c
+++ b/src/add_window.c
@@ -1388,7 +1388,7 @@ CreateTwmColormap(Colormap c)
{
TwmColormap *cmap;
- cmap = malloc(sizeof(TwmColormap));
+ cmap = calloc(1, sizeof(TwmColormap));
if (!cmap || XSaveContext(dpy, c, ColormapContext, (XPointer) cmap)) {
if (cmap)
free(cmap);