X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=misc.c;h=636ca9f39f003a60901ea4f2495c0cdf027775af;hb=615455a913d5d28c1368406474ae4bb06697bf44;hp=8a9c7b11ed3ea1759c878ae16eaea9ab737c3d79;hpb=da66c0656a6622a23cfdd8316e66681e487b87f1;p=PuTTY.git 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. *