summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src/glusterfsd-mgmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'glusterfsd/src/glusterfsd-mgmt.c')
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index be84167e4f0..a98492fac7b 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -1473,6 +1473,9 @@ glusterfs_volfile_reconfigure (FILE *newvolfile_fp)
}
fwrite (oldvolfile, oldvollen, 1, oldvolfile_fp);
fflush (oldvolfile_fp);
+ if (ferror (oldvolfile_fp)) {
+ goto out;
+ }
oldvolfile_graph = glusterfs_graph_construct (oldvolfile_fp);
@@ -1581,6 +1584,10 @@ mgmt_getspec_cbk (struct rpc_req *req, struct iovec *iov, int count,
fwrite (rsp.spec, size, 1, tmpfp);
fflush (tmpfp);
+ if (ferror (tmpfp)) {
+ ret = -1;
+ goto out;
+ }
/* Check if only options have changed. No need to reload the
* volfile if topology hasn't changed.