Skip to content

Commit c906d46

Browse files
committed
free secret before over-writing it
1 parent 7f4716f commit c906d46

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/bin/radclient.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1984,7 +1984,10 @@ int main(int argc, char **argv)
19841984
/*
19851985
* Add the secret.
19861986
*/
1987-
if (argv[3]) secret = talloc_strdup(NULL, argv[3]);
1987+
if (argv[3]) {
1988+
talloc_free(secret);
1989+
secret = talloc_strdup(NULL, argv[3]);
1990+
}
19881991

19891992
/*
19901993
* If no '-f' is specified, we're reading from stdin.

0 commit comments

Comments
 (0)