mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Fix memory leak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24947 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7081848688
commit
575a3e2f38
2 changed files with 23 additions and 10 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
* Source/NSPredicate.m: ([-parseOr]) Use orPredicateWithSubpredicates
|
||||
rather than andPredicateWithSubpredicates. Fix for bug #19446.
|
||||
* Source/unix/NSStream.m: Fix memory leak.
|
||||
|
||||
2007-03-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -292,8 +292,10 @@ static void setNonblocking(int fd)
|
|||
- (void) dealloc
|
||||
{
|
||||
if ([self _isOpened])
|
||||
[self close];
|
||||
RELEASE(_path);
|
||||
{
|
||||
[self close];
|
||||
}
|
||||
DESTROY(_path);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -411,7 +413,7 @@ static void setNonblocking(int fd)
|
|||
|
||||
- (void) setSibling: (GSOutputStream*)sibling
|
||||
{
|
||||
ASSIGN(_sibling, sibling);
|
||||
_sibling = sibling;
|
||||
}
|
||||
|
||||
- (void) setPassive: (BOOL)passive
|
||||
|
@ -433,8 +435,11 @@ static void setNonblocking(int fd)
|
|||
- (void) dealloc
|
||||
{
|
||||
if ([self _isOpened])
|
||||
[self close];
|
||||
RELEASE(_sibling);
|
||||
{
|
||||
[self close];
|
||||
}
|
||||
[(GSSocketOutputStream*)_sibling setSibling: nil];
|
||||
_sibling = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -719,7 +724,9 @@ static void setNonblocking(int fd)
|
|||
- (void) dealloc
|
||||
{
|
||||
if ([self _isOpened])
|
||||
[self close];
|
||||
{
|
||||
[self close];
|
||||
}
|
||||
RELEASE(_path);
|
||||
[super dealloc];
|
||||
}
|
||||
|
@ -830,7 +837,7 @@ static void setNonblocking(int fd)
|
|||
|
||||
- (void) setSibling: (GSInputStream*)sibling
|
||||
{
|
||||
ASSIGN(_sibling, sibling);
|
||||
_sibling = sibling;
|
||||
}
|
||||
|
||||
- (void) setPassive: (BOOL)passive
|
||||
|
@ -851,8 +858,11 @@ static void setNonblocking(int fd)
|
|||
- (void) dealloc
|
||||
{
|
||||
if ([self _isOpened])
|
||||
[self close];
|
||||
RELEASE(_sibling);
|
||||
{
|
||||
[self close];
|
||||
}
|
||||
[(GSSocketInputStream*)_sibling setSibling: nil];
|
||||
_sibling = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -1425,7 +1435,9 @@ static void setNonblocking(int fd)
|
|||
- (void) dealloc
|
||||
{
|
||||
if ([self _isOpened])
|
||||
[self close];
|
||||
{
|
||||
[self close];
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue