aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/dev/vesa.c
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2016-07-14 10:47:53 +0200
committerAlex Auvolat <alex@adnab.me>2016-07-14 10:47:53 +0200
commit477911553e0443fcafad5bd96c97314aa2f8d9ea (patch)
tree3825cba2552c0c4fe9cf64aecf065402db90f39e /src/kernel/dev/vesa.c
parentd09f8a08bdd9477bd463a2de03397ff56b5ce75d (diff)
downloadkogata-477911553e0443fcafad5bd96c97314aa2f8d9ea.tar.gz
kogata-477911553e0443fcafad5bd96c97314aa2f8d9ea.zip
Integration of scan-build and splint
Diffstat (limited to 'src/kernel/dev/vesa.c')
-rw-r--r--src/kernel/dev/vesa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/kernel/dev/vesa.c b/src/kernel/dev/vesa.c
index f77b230..03418b4 100644
--- a/src/kernel/dev/vesa.c
+++ b/src/kernel/dev/vesa.c
@@ -281,6 +281,8 @@ void vesa_detect(fs_t *iofs) {
uint16_t *last_mode = modes;
while (*last_mode != 0xFFFF) last_mode++;
+ if (last_mode == modes) goto end_detect;
+
mode_data = (vesa_mode_t*)malloc((last_mode - modes) * sizeof(vesa_mode_t));
if (mode_data == 0) goto end_detect;