diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-05-22 21:13:36 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-05-22 21:13:36 +0200 |
commit | 060706b08b2fec298a99d63f2e94a76bd7e40e20 (patch) | |
tree | d0f90c2b72172b86e0f69aa201e782fcbfe36f31 | |
parent | ac2f2f092dfbe2599baba119daf8cd036a2ec043 (diff) | |
download | dabmux-060706b08b2fec298a99d63f2e94a76bd7e40e20.tar.gz dabmux-060706b08b2fec298a99d63f2e94a76bd7e40e20.tar.bz2 dabmux-060706b08b2fec298a99d63f2e94a76bd7e40e20.zip |
zmqinput-keygen: do not write files if generation failed
-rw-r--r-- | src/zmqinput-keygen.c | 1 |
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); |