]> git.sur5r.net Git - i3/i3/commit
Fix potential memory leak 3192/head
authorElouan Martinet <exa@elou.world>
Tue, 20 Mar 2018 13:06:17 +0000 (13:06 +0000)
committerElouan Martinet <exa@elou.world>
Tue, 27 Mar 2018 10:23:16 +0000 (10:23 +0000)
commite6bd2006bcbdd39d23cc43051de7743708ca43c3
tree5883766261df7ac40625820d5b3ead210ab69bb9
parentddc80ab3054711269c7875de2bad916ba9c93ef1
Fix potential memory leak

xkb_state_new uses calloc and may fail in a rare case, which would cause a memory leak.
Note that xkb_state_unref checks if the parameter given is not null (!state) before freeing.
Calls to xkb_state_new have been grouped to remove code duplication.

Signed-off-by: Elouan Martinet <exa@elou.world>
src/bindings.c