mirror of
https://github.com/Yubico/yubico-pam.git
synced 2025-02-22 00:54:30 +01:00
free() filename before throwing the pointer away
avoids a memory-leak pointed out by @crosser
This commit is contained in:
parent
40bea18651
commit
9e00b0cadc
1
util.c
1
util.c
@ -220,6 +220,7 @@ get_user_challenge_file(YK_KEY *yk, const char *chalresp_path, const char *usern
|
|||||||
filename_malloced = 1;
|
filename_malloced = 1;
|
||||||
if (res < 0 || res > len) {
|
if (res < 0 || res > len) {
|
||||||
/* Not enough space, strangely enough. */
|
/* Not enough space, strangely enough. */
|
||||||
|
free(filename);
|
||||||
filename = NULL;
|
filename = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user