wmaker: remove non-necessary allocation (Coverity #109609)
commitd72e6d415a78972e9085841545f5de58e931b4f3
authorChristophe CURIS <christophe.curis@free.fr>
Sat, 25 Apr 2015 10:44:25 +0000 (25 12:44 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Sat, 25 Apr 2015 11:53:06 +0000 (25 07:53 -0400)
tree2f2a34522042a6cfdc948e1a3c6affb9deaf5ae3
parent04404bf47c4eed536dde614333eb83b923b3ae59
wmaker: remove non-necessary allocation (Coverity #109609)

As pointed by Coverity, there was a memory leak because the buffer used to
create the wmsetbg command is allocated twice.

Because it is not really necessary to call 'wmalloc' for such a small case
(it is not efficient and participates to memory fragmentation), this patch
replaces the dynamic memory allocation by a buffer on the stack, which also
solves to de-allocation issue.

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