Welcome to mirror list, hosted at ThFree Co, Russian Federation.

burnstr.c « utils - github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 33214d897f1348db54b828475529fff3455aaaa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
 * '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);
    }
}