summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-rpc-ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src/cli-rpc-ops.c')
-rw-r--r--cli/src/cli-rpc-ops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 5471291ab63..3065f64f0eb 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -4760,7 +4760,7 @@ write_contents_to_common_pem_file (dict_t *dict, int output_count)
cli_out ("Common secret pub file present at %s", common_pem_file);
ret = 0;
out:
- if (fd)
+ if (fd >= 0)
close (fd);
gf_log ("", GF_LOG_DEBUG, "Returning %d", ret);