xenstat: don't leak memory in getBridge
authorMatthew Daley <mattd@bugfuzz.com>
Sun, 4 May 2014 08:31:47 +0000 (20:31 +1200)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 8 May 2014 09:48:15 +0000 (10:48 +0100)
commit8a158bc59cfb4c51a355cefb0a6b565b83ad5028
treeddd3b6f95ce41027a98a18b158884213d49cc283
parent261bf3449737728975a164d0ecde2f3105d2a3c1
xenstat: don't leak memory in getBridge

getBridge's method of returning a result was a little confused:
allocating a result buffer but never using it.

Simplify by instead allowing a result buffer to be passed in and
modifying the single usage to match.

Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/xenstat/libxenstat/src/xenstat_linux.c