wmaker: fix incorrect size for memory allocation (Coverity #50207)
commitae078991221b32367f98754e632021d3975827aa
authorChristophe CURIS <christophe.curis@free.fr>
Sat, 25 Apr 2015 10:44:23 +0000 (25 12:44 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Sat, 25 Apr 2015 11:53:06 +0000 (25 07:53 -0400)
tree799a94bfaee339efdbcb315aa84959a7e4634cd7
parent15db368291419e523d6787d5c968e312b1211b55
wmaker: fix incorrect size for memory allocation (Coverity #50207)

As pointed by Coverity, when increasing the size of the array allocated to
store the pointers to menus in a cascaded menu, the incorrect value was
used in argument to the sizeof which lead to over-allocating memory.

This patch replaces the name of the structure (which should have been the
pointer type) by the variable actually being used, fixing the size issue
and making maintainability easier by tracking the type of the variable
which is less prone to bugs in case of change.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
src/menu.c