X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/b61f81bc4c102d06f13fd68e4a73ab8fdfdb3cf5..6f3370a03ed6393c049a13b78d2188135624beea:/misc.c diff --git a/misc.c b/misc.c index 8a9c7b11..636ca9f3 100644 --- a/misc.c +++ b/misc.c @@ -200,6 +200,14 @@ char *dupcat(const char *s1, ...) return p; } +void burnstr(char *string) /* sfree(str), only clear it first */ +{ + if (string) { + memset(string, 0, strlen(string)); + sfree(string); + } +} + /* * Do an sprintf(), but into a custom-allocated buffer. *