diff options
author | Wayne Davison <wayned@samba.org> | 2007-12-15 11:57:34 -0800 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2007-12-15 11:57:34 -0800 |
commit | a7188cbf48f30782c7dc1ba70bbb93ef8e37dc13 (patch) | |
tree | 3759eaa1ca02613ef8057aa58e24bfc24868e176 | |
parent | f7a2ac075f267d4cba779c26e20147d25d047e4e (diff) | |
download | rsync-a7188cbf48f30782c7dc1ba70bbb93ef8e37dc13.tar.gz rsync-a7188cbf48f30782c7dc1ba70bbb93ef8e37dc13.tar.bz2 rsync-a7188cbf48f30782c7dc1ba70bbb93ef8e37dc13.zip |
Fixed a potential memory leak in make_file().
-rw-r--r-- | flist.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1231,8 +1231,11 @@ struct file_struct *make_file(const char *fname, struct file_list *flist, file->mode = save_mode; } - if (basename_len == 0+1) + if (basename_len == 0+1) { + if (!pool) + unmake_file(file); return NULL; + } if (unsort_ndx) F_NDX(file) = dir_count; |