Release the key value binding as it will be

retained in the binding table.
Leak found by static code analyser.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32484 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2011-03-07 13:35:37 +00:00
parent fcfa7dafb4
commit a953d2bda0
8 changed files with 87 additions and 43 deletions

View file

@ -5314,13 +5314,17 @@ current key view.<br />
{
if ([binding isEqual: NSTitleBinding])
{
GSKeyValueBinding *kvb;
[self unbind: binding];
[[GSKeyValueBinding alloc] initWithBinding: @"title"
withName: NSTitleBinding
toObject: anObject
withKeyPath: keyPath
options: options
fromObject: self];
kvb = [[GSKeyValueBinding alloc] initWithBinding: @"title"
withName: NSTitleBinding
toObject: anObject
withKeyPath: keyPath
options: options
fromObject: self];
// The binding will be retained in the binding table
RELEASE(kvb);
}
else
{