chiark
/
gitweb
/
~mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
8ee25fa
)
key/key-io.c (key_new): Don't leak attribute `sym_table' on error.
author
Mark Wooding
<mdw@distorted.org.uk>
Tue, 8 Oct 2019 10:36:34 +0000
(11:36 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Tue, 8 Oct 2019 10:37:55 +0000
(11:37 +0100)
This is safe: `insert' doesn't do anything with `k->a'.
key/key-io.c
patch
|
blob
|
blame
|
history
diff --git
a/key/key-io.c
b/key/key-io.c
index c79c8e063ae0b2b8d2bab463d299a8ed74dcb8ea..15bebdc152ef8b85818cfd562b27b10b69a219e3 100644
(file)
--- a/
key/key-io.c
+++ b/
key/key-io.c
@@
-552,12
+552,12
@@
int key_new(key_file *f, uint32 id, const char *type, time_t exp, key **kk)
k->exp = k->del = exp;
k->c = 0;
k->type = (char *)type; /* temporarily */
- sym_create(&k->a);
if ((e = insert(f, k)) != 0)
DESTROY(k);
else {
k->k = key_newstring(KCAT_SHARE, "<unset>");
k->type = xstrdup(type);
+ sym_create(&k->a);
*kk = k;
f->f |= KF_MODIFIED;
}