mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-20 05:37:57 +00:00
fixed keyring-related memory leaks
This commit is contained in:
parent
b3ad074666
commit
f1d817463e
@ -223,6 +223,7 @@ void keyring_free(keyring_file *k)
|
||||
|
||||
/* Wipe everything, just to be sure. */
|
||||
bzero(k,sizeof(keyring_file));
|
||||
free(k);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -272,6 +273,7 @@ static void keyring_free_context(keyring_context *c)
|
||||
}
|
||||
if (c->KeyRingSalt) {
|
||||
bzero(c->KeyRingSalt,c->KeyRingSaltLen);
|
||||
free(c->KeyRingSalt);
|
||||
c->KeyRingSalt = NULL;
|
||||
c->KeyRingSaltLen = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user