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
74571136
...
7457113631decc8cd82338cc04c70020691b4485
authored
2007-04-12 16:22:42 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(mu_mailbox_create_default): Fix memory leaks
1 parent
e3aa5223
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
mailbox/mbx_default.c
mailbox/mbx_default.c
View file @
7457113
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2003, 2004,
2005, 2006 Free Software Foundation, Inc.
2005, 2006
, 2007
Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
...
...
@@ -323,11 +323,9 @@ mu_mailbox_create_default (mu_mailbox_t *pmbox, const char *mail)
p
=
mu_tilde_expansion
(
mail
,
"/"
,
NULL
);
if
(
tmp_mbox
)
{
free
(
tmp_mbox
);
tmp_mbox
=
p
;
}
mail
=
p
;
free
(
tmp_mbox
);
tmp_mbox
=
p
;
mail
=
tmp_mbox
;
if
(
!
mail
)
return
ENOMEM
;
...
...
@@ -349,9 +347,10 @@ mu_mailbox_create_default (mu_mailbox_t *pmbox, const char *mail)
default:
if
(
!
mu_is_proto
(
mail
))
{
tmp_mbox
=
mu_getcwd
();
mbox
=
malloc
(
strlen
(
tmp_mbox
)
+
strlen
(
mail
)
+
2
);
sprintf
(
mbox
,
"%s/%s"
,
tmp_mbox
,
mail
);
p
=
mu_getcwd
();
mbox
=
malloc
(
strlen
(
p
)
+
strlen
(
mail
)
+
2
);
sprintf
(
mbox
,
"%s/%s"
,
p
,
mail
);
free
(
p
);
}
else
mbox
=
strdup
(
mail
);
...
...
Please
register
or
sign in
to post a comment