From 060706b08b2fec298a99d63f2e94a76bd7e40e20 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 22 May 2015 21:13:36 +0200 Subject: zmqinput-keygen: do not write files if generation failed --- src/zmqinput-keygen.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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); -- cgit v1.2.3