1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2025-02-21 06:54:15 +01:00

free() filename before throwing the pointer away

avoids a memory-leak pointed out by @crosser
This commit is contained in:
Klas Lindfors 2013-11-21 14:38:32 +01:00
parent 40bea18651
commit 9e00b0cadc

1
util.c
View File

@ -220,6 +220,7 @@ get_user_challenge_file(YK_KEY *yk, const char *chalresp_path, const char *usern
filename_malloced = 1;
if (res < 0 || res > len) {
/* Not enough space, strangely enough. */
free(filename);
filename = NULL;
}
}