2011/7/15 <ajia@xxxxxxxxxx>: > * src/network/bridge_driver.c: Fix memory leak on cleanup section from > networkGetBridgeName function. > --- > src/network/bridge_driver.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c > index 0a12bc0..59e780d 100644 > --- a/src/network/bridge_driver.c > +++ b/src/network/bridge_driver.c > @@ -2474,7 +2474,8 @@ static char *networkGetBridgeName(virNetworkPtr net) { > cleanup: > if (network) > virNetworkObjUnlock(network); > - return bridge; > + VIR_FREE(bridge); > + return NULL; > } > > static int networkGetAutostart(virNetworkPtr net, NACK. Now networkGetBridgeName returns NULL always, that's wrong. Why do you think that there is a leak? -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list