From c64c1781a52c30416caa8e276616f7ca0135f14a Mon Sep 17 00:00:00 2001 From: actionless Date: Thu, 7 Nov 2024 07:30:50 +0100 Subject: [PATCH] fix(xst: xtdb_load: font_fallback): add missing return statements on font loading error --- xst.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xst.c b/xst.c index 3772849..6a8a787 100644 --- a/xst.c +++ b/xst.c @@ -73,6 +73,7 @@ xrdb_load(void) fallback_fonts = realloc(fallback_fonts, (fonts_count + count + 2) * sizeof(char *)); if (!fallback_fonts) { printf("ERROR: can't load fonts from 'st.font_fallback' !\n"); + return; } for (int i = 0; i <= count; i++) { @@ -89,6 +90,7 @@ xrdb_load(void) fallback_fonts = realloc(fallback_fonts, (fonts_count + 2) * sizeof(char *)); if (!fallback_fonts) { printf("ERROR: can't load fonts from 'st.font_fallback' !\n"); + return; } fallback_fonts[fonts_count++] = ret.addr;