X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fctf.c;h=8029512a2745876f9ce19e9ce1fab725fb64ddf7;hp=37e314849c611844065e0605ef7fa3dbfafabce9;hb=08c82b90d94a6dfee1f3da4ec06864c6045c07f7;hpb=a7af71619e2ca1e763d90a8156fe4206c012d8cc diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index 37e31484..8029512a 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -583,11 +583,11 @@ int ctf_init_pos(struct ctf_stream_pos *pos, int fd, int open_flags) int ctf_fini_pos(struct ctf_stream_pos *pos) { - int ret; - if (pos->prot == PROT_WRITE && pos->content_size_loc) *pos->content_size_loc = pos->offset; if (pos->base_mma) { + int ret; + /* unmap old base */ ret = munmap_align(pos->base_mma); if (ret) { @@ -1940,9 +1940,11 @@ static int ctf_close_trace(struct trace_descriptor *tdp) { struct ctf_trace *td = container_of(tdp, struct ctf_trace, parent); - int i, ret; + int ret; if (td->streams) { + int i; + for (i = 0; i < td->streams->len; i++) { struct ctf_stream_declaration *stream; int j;