]> git.sur5r.net Git - i3/i3status/commit
Prevent potential crash if glob() fails 290/head
authorOlivier Gayot <olivier.gayot@sigexec.com>
Wed, 20 Jun 2018 11:41:59 +0000 (13:41 +0200)
committerOlivier Gayot <olivier.gayot@sigexec.com>
Wed, 20 Jun 2018 12:20:17 +0000 (14:20 +0200)
commitc221b4d331d46d07fe24afc78e4eeb021556d013
tree66846b5f6023291fda2d72fe523d4ee0614d2a1f
parent445b1925e3d2e239740d7765e5892d0671174e8e
Prevent potential crash if glob() fails

Calling globfree(NULL) is undefined behaviour. In Linux (glibc), it
results in a segmentation fault.

It is also undefined behaviour to call globfree(&pglob) if a previous
call to glob(&pglob) returned an error.

Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
src/print_battery_info.c