diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-snapshot.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-snapshot.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c index cdd19cd354d..476bfb8e017 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c @@ -551,6 +551,14 @@ glusterd_copy_geo_rep_session_files (char *session, } } out: + /* files are malloc'd by scandir, free them */ + if (file_count > 0) { + while (file_count--) { + free(files[file_count]); + } + free(files); + } + if (reg_exp) GF_FREE (reg_exp); |