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
604452f1
...
604452f107cafe97e3a7b2d0b5147ad128219f89
authored
2002-08-01 14:06:14 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(read_rc): Bugfix. linebuf must be freed
no matter was the string accepted or not.
1 parent
50e90b94
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
27 deletions
mailbox/mu_argp.c
mailbox/mu_argp.c
View file @
604452f
...
...
@@ -538,10 +538,10 @@ read_rc (const char *progname, const char *name, const char *capa[],
fp
=
fopen
(
rcfile
,
"r"
);
if
(
!
fp
)
{
free
(
rcfile
);
return
;
}
{
free
(
rcfile
);
return
;
}
while
(
getline
(
&
buf
,
&
n
,
fp
)
>
0
)
{
...
...
@@ -589,10 +589,10 @@ read_rc (const char *progname, const char *name, const char *capa[],
len
=
0
;
if
(
progname
)
{
for
(
p
=
kwp
;
*
p
&&
!
isspace
(
*
p
);
p
++
)
len
++
;
}
{
for
(
p
=
kwp
;
*
p
&&
!
isspace
(
*
p
);
p
++
)
len
++
;
}
else
p
=
kwp
;
/* Use the whole line. */
...
...
@@ -624,10 +624,10 @@ read_rc (const char *progname, const char *name, const char *capa[],
x_argv
[
x_argc
++
]
=
n_argv
[
i
];
free
(
n_argv
);
if
(
linebuf
)
free
(
linebuf
);
linebuf
=
NULL
;
}
if
(
linebuf
)
free
(
linebuf
);
linebuf
=
NULL
;
}
fclose
(
fp
);
free
(
rcfile
);
...
...
@@ -689,29 +689,29 @@ mu_create_argcv (const char *capa[],
/* Add per-user config file. */
if
(
!
rcdir
)
{
read_rc
(
progname
,
MU_USER_CONFIG_FILE
,
capa
,
&
x_argc
,
&
x_argv
);
}
{
read_rc
(
progname
,
MU_USER_CONFIG_FILE
,
capa
,
&
x_argc
,
&
x_argv
);
}
else
{
char
*
userrc
=
NULL
;
{
char
*
userrc
=
NULL
;
mu_asprintf
(
&
userrc
,
"%s/mailutils"
,
MU_USER_CONFIG_FILE
);
mu_asprintf
(
&
userrc
,
"%s/mailutils"
,
MU_USER_CONFIG_FILE
);
if
(
!
userrc
)
{
fprintf
(
stderr
,
"%s: not enough memory
\n
"
,
progname
);
exit
(
1
);
}
read_rc
(
progname
,
userrc
,
capa
,
&
x_argc
,
&
x_argv
);
free
(
userrc
);
}
if
(
!
userrc
)
{
fprintf
(
stderr
,
"%s: not enough memory
\n
"
,
progname
);
exit
(
1
);
}
read_rc
(
progname
,
userrc
,
capa
,
&
x_argc
,
&
x_argv
);
free
(
userrc
);
}
/* Add per-user, per-program config file. */
{
char
*
progrc
=
NULL
;
if
(
rcdir
)
mu_asprintf
(
&
progrc
,
"%s/%src"
,
MU_USER_CONFIG_FILE
,
progname
);
else
...
...
Please
register
or
sign in
to post a comment