X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/b61f81bc4c102d06f13fd68e4a73ab8fdfdb3cf5..fc40b431a9049585675e171643eb308cc548713c:/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. *