Changeset 877 in openpam for trunk/lib


Ignore:
Timestamp:
Jan 9, 2016, 5:26:18 PM (5 years ago)
Author:
Dag-Erling Smørgrav
Message:

Plug potential memory leak reported by Coverity Scan. I'm not sure it
can actually ever occur, but the extra free() is harmless, provided we
make sure not to free() something we're still using.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/libpam/openpam_readlinev.c

    r648 r877  
    8080                wordv[wordvlen++] = word;
    8181                wordv[wordvlen] = NULL;
     82                word = NULL;
    8283        }
    8384        if (errno != 0) {
     
    8788                        free(wordv[wordvlen]);
    8889                free(wordv);
     90                free(word);
    8991                errno = serrno;
    9092                return (NULL);
Note: See TracChangeset for help on using the changeset viewer.