mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 09:27:59 +00:00
16 lines
299 B
C
16 lines
299 B
C
|
/*
|
||
|
* 'Burn' a dynamically allocated string, in the sense of destroying
|
||
|
* it beyond recovery: overwrite it with zeroes and then free it.
|
||
|
*/
|
||
|
|
||
|
#include "defs.h"
|
||
|
#include "misc.h"
|
||
|
|
||
|
void burnstr(char *string)
|
||
|
{
|
||
|
if (string) {
|
||
|
smemclr(string, strlen(string));
|
||
|
sfree(string);
|
||
|
}
|
||
|
}
|