diff options
-rw-r--r-- | src/dabInputZmq.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dabInputZmq.cpp b/src/dabInputZmq.cpp index 5c20baf..e5a1654 100644 --- a/src/dabInputZmq.cpp +++ b/src/dabInputZmq.cpp @@ -71,9 +71,10 @@ int readkey(string& keyfile, char* key) if (fd < 0) return fd; int ret = read(fd, key, CURVE_KEYLEN); - if (ret < 0) - return ret; close(fd); + if (ret < 0) { + return ret; + } /* It needs to be zero-terminated */ key[CURVE_KEYLEN] = '\0'; |