From 8b9fc36ad7daf88fead2b486a2932c98cffa414a Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Tue, 5 Nov 2019 15:06:52 -0500 Subject: [PATCH] src.ctf.fs: don't call ds_file_munmap on failure in ds_file_mmap_next It seems useless to call ds_file_munmap here. We can reach the error label either because: - the previous call to ds_file_munmap has failed, in which case there's no point in retrying - the mmap call returned MAP_FAILED, in which case there's no point un unmapping Change-Id: Ia11716a967047d32773ab67f51bcf7516489f183 Signed-off-by: Simon Marchi --- src/plugins/ctf/fs-src/data-stream-file.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugins/ctf/fs-src/data-stream-file.c b/src/plugins/ctf/fs-src/data-stream-file.c index 1dacf230..0234a8f8 100644 --- a/src/plugins/ctf/fs-src/data-stream-file.c +++ b/src/plugins/ctf/fs-src/data-stream-file.c @@ -125,7 +125,6 @@ enum ctf_msg_iter_medium_status ds_file_mmap_next( goto end; error: - ds_file_munmap(ds_file); ret = CTF_MSG_ITER_MEDIUM_STATUS_ERROR; end: return ret; -- 2.34.1