projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove unused '#include's.
[tinc]
/
src
/
sptps_keypair.c
diff --git
a/src/sptps_keypair.c
b/src/sptps_keypair.c
index
51a94ee
..
4dbd2ba
100644
(file)
--- a/
src/sptps_keypair.c
+++ b/
src/sptps_keypair.c
@@
-23,7
+23,6
@@
#include "crypto.h"
#include "ecdsagen.h"
#include "crypto.h"
#include "ecdsagen.h"
-#include "utils.h"
static char *program_name;
static char *program_name;
@@
-97,12
+96,14
@@
int main(int argc, char *argv[]) {
if(fp) {
if(!ecdsa_write_pem_private_key(key, fp)) {
fprintf(stderr, "Could not write ECDSA private key\n");
if(fp) {
if(!ecdsa_write_pem_private_key(key, fp)) {
fprintf(stderr, "Could not write ECDSA private key\n");
+ free(key);
return 1;
}
fclose(fp);
} else {
fprintf(stderr, "Could not open '%s' for writing: %s\n", argv[1], strerror(errno));
return 1;
}
fclose(fp);
} else {
fprintf(stderr, "Could not open '%s' for writing: %s\n", argv[1], strerror(errno));
+ free(key);
return 1;
}
return 1;
}
@@
-113,11
+114,12
@@
int main(int argc, char *argv[]) {
fprintf(stderr, "Could not write ECDSA public key\n");
}
fprintf(stderr, "Could not write ECDSA public key\n");
}
+ free(key);
fclose(fp);
fclose(fp);
+ return 0;
} else {
fprintf(stderr, "Could not open '%s' for writing: %s\n", argv[2], strerror(errno));
} else {
fprintf(stderr, "Could not open '%s' for writing: %s\n", argv[2], strerror(errno));
+ free(key);
return 1;
}
return 1;
}
-
- return 0;
}
}