dovecot-2.2: lib-fs: Make sure we don't leak data stack.
dovecot at dovecot.org
dovecot at dovecot.org
Wed May 14 09:29:08 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/e7c737fc7e54
changeset: 17380:e7c737fc7e54
user: Timo Sirainen <tss at iki.fi>
date: Wed May 14 12:28:17 2014 +0300
description:
lib-fs: Make sure we don't leak data stack.
diffstat:
src/lib-fs/fs-api.c | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diffs (46 lines):
diff -r 8d1dcd28ee11 -r e7c737fc7e54 src/lib-fs/fs-api.c
--- a/src/lib-fs/fs-api.c Tue May 13 15:46:01 2014 +0200
+++ b/src/lib-fs/fs-api.c Wed May 14 12:28:17 2014 +0300
@@ -143,7 +143,9 @@
}
i_free(fs->temp_path_prefix);
- fs->v.deinit(fs);
+ T_BEGIN {
+ fs->v.deinit(fs);
+ } T_END;
str_free(&last_error);
}
@@ -242,11 +244,16 @@
int fs_get_metadata(struct fs_file *file,
const ARRAY_TYPE(fs_metadata) **metadata_r)
{
+ int ret;
+
if (file->fs->v.get_metadata == NULL) {
fs_set_error(file->fs, "Metadata not supported by backend");
return -1;
}
- return file->fs->v.get_metadata(file, metadata_r);
+ T_BEGIN {
+ ret = file->fs->v.get_metadata(file, metadata_r);
+ } T_END;
+ return ret;
}
const char *fs_file_path(struct fs_file *file)
@@ -677,7 +684,12 @@
const char *fs_iter_next(struct fs_iter *iter)
{
- return iter->fs->v.iter_next(iter);
+ const char *ret;
+
+ T_BEGIN {
+ ret = iter->fs->v.iter_next(iter);
+ } T_END;
+ return ret;
}
void fs_iter_set_async_callback(struct fs_iter *iter,
More information about the dovecot-cvs
mailing list