]> git.sur5r.net Git - i3/i3/commit
Avoid use of uninitialized in init_dpi_end
authorTheo Buehler <tb@openbsd.org>
Wed, 23 Aug 2017 13:48:58 +0000 (15:48 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Wed, 6 Sep 2017 05:36:08 +0000 (07:36 +0200)
commite8dbf0171de8c7399dcdfc3c42610e5f3bf418d1
tree99898dbc661f6d9dfcb1f64dd1ab323f5e658ba4
parente1f6a3e3d3310904b2c74373eb50b28b3a3394af
Avoid use of uninitialized in init_dpi_end

If conn == NULL or display == NULL, init_dpi() jumps to init_dpi_end
before (declaring and) initializing resource. In init_dpi_end, there
is a free(resource) call conditionally on resource != NULL, so this
may lead to a bogus free. Found by clang -Wsometimes-uninitialized.
libi3/dpi.c