Skip to content

glamor: fix free of uninitialised pointers

Jonathan Gray requested to merge jsg/xserver:glamor-uninit into master

Attempting to run fvwm on a x61/965gm with xserver 1.21.1 with the modesetting driver on OpenBSD/amd64 would cause the xserver to reliably crash.

I tracked this down to the free() calls introduced in 2906ee5e (d1ca47e1 in branch).

clang also warns about this: glamor_program.c:296:13: warning: variable 'vs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:290:9: warning: variable 'vs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:288:9: warning: variable 'vs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:277:13: warning: variable 'vs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:296:13: warning: variable 'fs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:290:9: warning: variable 'fs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:288:9: warning: variable 'fs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:277:13: warning: variable 'fs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]

Signed-off-by: Jonathan Gray jsg@jsg.id.au Fixes: 2906ee5e ("glamor: Fix leak in glamor_build_program()")

Merge request reports

Loading