summaryrefslogtreecommitdiff
path: root/libmailutils/url
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-07-15 22:01:43 +0300
committerSergey Poznyakoff <gray@gnu.org>2020-07-15 22:01:43 +0300
commit34119a423cd4ff37ee9d6140e8dd2a32f48ff3b9 (patch)
tree77bfd892b336fcbfd431c2e55cf0a1f0f97936db /libmailutils/url
parent88654e124d4873ef80be5e7383f46a32520f3a7c (diff)
downloadmailutils-34119a423cd4ff37ee9d6140e8dd2a32f48ff3b9.tar.gz
mailutils-34119a423cd4ff37ee9d6140e8dd2a32f48ff3b9.tar.bz2
Fix memory leaks.
* libmailutils/sockaddr/free.c (mu_sockaddr_free): Free the address itself. * libmailutils/stream/message_stream.c (mu_message_from_stream_with_envelope): Envelope must be owned by the message. Change mu_envelope_create accordingly. (_env_msg_date, _env_msg_sender): Likewise. * libmailutils/url/destroy.c: Free url->portstr.
Diffstat (limited to 'libmailutils/url')
-rw-r--r--libmailutils/url/destroy.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/libmailutils/url/destroy.c b/libmailutils/url/destroy.c
index d342b664a..ba341e90f 100644
--- a/libmailutils/url/destroy.c
+++ b/libmailutils/url/destroy.c
@@ -42,25 +42,16 @@ mu_url_destroy (mu_url_t * purl)
if (url->_destroy)
url->_destroy (url);
- if (url->name)
- free (url->name);
-
- if (url->scheme)
- free (url->scheme);
-
- if (url->user)
- free (url->user);
+ free (url->name);
+ free (url->scheme);
+ free (url->user);
mu_secret_destroy (&url->secret);
- if (url->auth)
- free (url->auth);
-
- if (url->host)
- free (url->host);
-
- if (url->path)
- free (url->path);
+ free (url->auth);
+ free (url->host);
+ free (url->portstr);
+ free (url->path);
if (url->fvcount)
mu_argcv_free (url->fvcount, url->fvpairs);

Return to:

Send suggestions and report system problems to the System administrator.