Changeset 488 in openpam for trunk


Ignore:
Timestamp:
Nov 5, 2011, 8:50:15 PM (8 years ago)
Author:
Dag-Erling Smørgrav
Message:

Always create optv, even if there are no options.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/openpam_configure.c

    r487 r488  
    465465
    466466                /* get module options */
    467                 this->optv = NULL;
     467                if ((this->optv = malloc(sizeof *optv)) == NULL)
     468                        goto syserr;
    468469                this->optc = 0;
    469470                while ((option = parse_option(&line)) != NULL) {
     
    474475                        this->optv = optv;
    475476                        this->optv[this->optc++] = option;
    476                         this->optv[this->optc] = NULL;
    477                 }
     477                }
     478                this->optv[this->optc] = NULL;
    478479                if (*line != '\0') {
    479480                        openpam_log(PAM_LOG_ERROR,
Note: See TracChangeset for help on using the changeset viewer.