Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
a250bc91
...
a250bc91a29211e4792f2098769363a820b16823
authored
2002-11-07 14:46:20 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fix memory leak. Patch provided by Frederic Gobry <frederic.gobry@smartdata.ch>
1 parent
f6b7a4d2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
mailbox/stream.c
mailbox/tcp.c
mailbox/stream.c
View file @
a250bc9
...
...
@@ -76,6 +76,10 @@ stream_destroy (stream_t *pstream, void *owner)
stream_close
(
stream
);
if
(
stream
->
rbuffer
.
base
)
free
(
stream
->
rbuffer
.
base
);
if
(
stream
->
_destroy
)
stream
->
_destroy
(
stream
);
free
(
stream
);
}
*
pstream
=
NULL
;
...
...
mailbox/tcp.c
View file @
a250bc9
...
...
@@ -84,15 +84,6 @@ _tcp_open (stream_t stream)
stream_get_flags
(
stream
,
&
flags
);
if
(
tcp
->
state
==
TCP_STATE_INIT
)
{
tcp
->
port
=
port
;
/* FIXME: this seems very strange, it is: tcp->host = strdup(tcp->host)
is this really intended? */
if
((
tcp
->
host
=
strdup
(
host
))
==
NULL
)
return
ENOMEM
;
}
switch
(
tcp
->
state
)
{
case
TCP_STATE_INIT
:
...
...
@@ -221,8 +212,6 @@ _tcp_destroy (stream_t stream)
if
(
tcp
->
fd
!=
-
1
)
close
(
tcp
->
fd
);
if
(
tcp
->
host
)
free
(
tcp
->
host
);
free
(
tcp
);
}
...
...
Please
register
or
sign in
to post a comment