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
0282f3bf
...
0282f3bfc15a364aebaea91197df6b5e658d7d9a
authored
2002-11-07 15:02:08 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Avoid unnecessary memory allocation.
1 parent
0b2a01ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
13 deletions
mail.local/main.c
mail.local/main.c
View file @
0282f3b
...
...
@@ -261,7 +261,7 @@ switch_user_id (struct mu_auth_data *auth, int user)
int
rc
;
uid_t
uid
;
if
(
auth
->
change_uid
==
0
)
if
(
!
auth
||
auth
->
change_uid
==
0
)
return
0
;
if
(
user
)
...
...
@@ -375,22 +375,13 @@ deliver (FILE *fp, char *name)
return
;
}
path
=
strdup
(
auth
->
mailbox
);
if
(
!
path
)
if
((
status
=
mailbox_create
(
&
mbox
,
auth
->
mailbox
))
!=
0
)
{
mailer_err
(
"Out of memory"
);
mailer_err
(
"can't open mailbox %s: %s"
,
auth
->
mailbox
,
mu_errstring
(
status
));
return
;
}
if
((
status
=
mailbox_create
(
&
mbox
,
path
))
!=
0
)
{
mailer_err
(
"can't open mailbox %s: %s"
,
path
,
mu_errstring
(
status
));
free
(
path
);
return
;
}
free
(
path
);
mailbox_get_url
(
mbox
,
&
url
);
path
=
(
char
*
)
url_to_string
(
url
);
...
...
Please
register
or
sign in
to post a comment