util: fixed memleak in wmsetbg's updateDomain (Coverity #50167)
commite5ebe0cb92a72538e195724e351dad905e7ee1db
authorChristophe CURIS <christophe.curis@free.fr>
Mon, 16 Jun 2014 18:15:23 +0000 (16 20:15 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Mon, 16 Jun 2014 19:00:09 +0000 (16 20:00 +0100)
treeb7dea4d36e4c7003329b0fb4506b018024cdacb5
parent9cef8c882e435df924741da38a8e96d9db114972
util: fixed memleak in wmsetbg's updateDomain (Coverity #50167)

As pointed by Coverity, the function wstrconcat is allocating memory to
return its result, which is not freed in old coding of the function.

This patch uses a local storage buffer to have a simpler code to generate
the command to bu run with 'system' without leak.

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