fixed double free() in pcpdelete_key()

This commit is contained in:
git@daemon.de
2014-08-01 08:34:53 +02:00
parent eb84621a89
commit 9796332826

View File

@@ -434,7 +434,6 @@ void pcpdelete_key(char *keyid) {
if(p != NULL) { if(p != NULL) {
/* delete public */ /* delete public */
pcphash_del(ptx, p, p->type); pcphash_del(ptx, p, p->type);
free(p);
vault->unsafed = 1; vault->unsafed = 1;
fprintf(stderr, "Public key deleted.\n"); fprintf(stderr, "Public key deleted.\n");
} }
@@ -443,7 +442,6 @@ void pcpdelete_key(char *keyid) {
if(s != NULL) { if(s != NULL) {
/* delete secret */ /* delete secret */
pcphash_del(ptx, s, s->type); pcphash_del(ptx, s, s->type);
free(s);
vault->unsafed = 1; vault->unsafed = 1;
fprintf(stderr, "Secret key deleted.\n"); fprintf(stderr, "Secret key deleted.\n");
} }