Always create optv, even if there are no options.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@488 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
parent
c86a681052
commit
e8522c7fcc
|
@ -464,7 +464,8 @@ openpam_parse_chain(pam_handle_t *pamh,
|
|||
this->flag = ctlf;
|
||||
|
||||
/* get module options */
|
||||
this->optv = NULL;
|
||||
if ((this->optv = malloc(sizeof *optv)) == NULL)
|
||||
goto syserr;
|
||||
this->optc = 0;
|
||||
while ((option = parse_option(&line)) != NULL) {
|
||||
optv = realloc(this->optv,
|
||||
|
@ -473,8 +474,8 @@ openpam_parse_chain(pam_handle_t *pamh,
|
|||
goto syserr;
|
||||
this->optv = optv;
|
||||
this->optv[this->optc++] = option;
|
||||
this->optv[this->optc] = NULL;
|
||||
}
|
||||
this->optv[this->optc] = NULL;
|
||||
if (*line != '\0') {
|
||||
openpam_log(PAM_LOG_ERROR,
|
||||
"%s(%d): syntax error in module options",
|
||||
|
|
Loading…
Reference in New Issue