Changeset 876 in openpam for trunk/lib


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

Don't forget to free the line we read from the key file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/liboath/oath_key_from_file.c

    r799 r876  
    6565        /* get first non-empty non-comment line */
    6666        line = openpam_readline(f, NULL, &len);
     67        fclose(f);
    6768        if (strlcmp("otpauth://", line, len) == 0) {
    6869                key = oath_key_from_uri(line);
     
    7273                key = NULL;
    7374        }
    74         fclose(f);
     75        free(line);
    7576        return (key);
    7677}
Note: See TracChangeset for help on using the changeset viewer.