aboutsummaryrefslogtreecommitdiff
path: root/spectrogram.c
diff options
context:
space:
mode:
Diffstat (limited to 'spectrogram.c')
-rw-r--r--spectrogram.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/spectrogram.c b/spectrogram.c
index 4930802..75908c1 100644
--- a/spectrogram.c
+++ b/spectrogram.c
@@ -89,6 +89,8 @@ init_palette(Display *d, float h, float dh, float s, float ds, float v, float dv
int i;
p = calloc(n, sizeof(unsigned long));
+ if (!p)
+ errx(1, "malloc failed");
hstep = (dh - h) / n;
sstep = (ds - s) / n;