summaryrefslogtreecommitdiffstats
path: root/src/zmqinput-keygen.c
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-05-22 21:13:36 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-05-22 21:13:36 +0200
commit060706b08b2fec298a99d63f2e94a76bd7e40e20 (patch)
treed0f90c2b72172b86e0f69aa201e782fcbfe36f31 /src/zmqinput-keygen.c
parentac2f2f092dfbe2599baba119daf8cd036a2ec043 (diff)
downloaddabmux-060706b08b2fec298a99d63f2e94a76bd7e40e20.tar.gz
dabmux-060706b08b2fec298a99d63f2e94a76bd7e40e20.tar.bz2
dabmux-060706b08b2fec298a99d63f2e94a76bd7e40e20.zip
zmqinput-keygen: do not write files if generation failed
Diffstat (limited to 'src/zmqinput-keygen.c')
-rw-r--r--src/zmqinput-keygen.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/zmqinput-keygen.c b/src/zmqinput-keygen.c
index 0169837..8bf61ac 100644
--- a/src/zmqinput-keygen.c
+++ b/src/zmqinput-keygen.c
@@ -58,6 +58,7 @@ int main(int argc, char** argv)
int rc = zmq_curve_keypair(public_key, secret_key);
if (rc != 0) {
fprintf(stderr, "key generation failed\n");
+ return 1;
}
int fdpub = creat(pubkeyfile, S_IRUSR | S_IWUSR);