diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-01-30 09:03:11 -0500 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-01-30 09:03:11 -0500 |
| commit | a208097c9091137908beaa1f1f261072df55d3fa (patch) | |
| tree | 8818bfa6c19c4a43b7bb19431a442d3bdfa9a80e /src/fs.c | |
| parent | 7c2b1baad8434f9f7b19efe48719942cb3bce4cd (diff) | |
| download | spmc-a208097c9091137908beaa1f1f261072df55d3fa.tar.gz | |
SEAD - memory leaks
Diffstat (limited to 'src/fs.c')
| -rw-r--r-- | src/fs.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -143,11 +143,13 @@ void fstree_free(FSTree *fsdata) { for (int i = 0; fsdata->files[i] != NULL; i++) { free(fsdata->files[i]); } + free(fsdata->files); } if (fsdata->dirs != NULL) { for (int i = 0; fsdata->dirs[i] != NULL; i++) { free(fsdata->dirs[i]); } + free(fsdata->dirs); } free(fsdata); } @@ -341,13 +343,14 @@ int rsync(const char *_args, const char *_source, const char *_destination) { returncode = proc->returncode; if (returncode != 0 && proc->output) { - fprintf(stderr, proc->output); + fprintf(stderr, "%s\n", proc->output); } shell_free(proc); if (args) { free(args); } + free(args_combined); free(source); free(destination); return returncode; |
