Project

General

Profile

Bug #790 » 0001-Fix-invalid-pointer-free-with-trace-collection.patch

Francis Giraldeau, 06/15/2015 11:43 AM

View differences:

lib/context.c
79 79
	struct bt_trace_descriptor *td;
80 80
	struct bt_format *fmt;
81 81
	struct bt_trace_handle *handle;
82
	int ret, closeret;
82
	int ret;
83 83

  
84 84
	if (!ctx || !format_name || (!path && !stream_list))
85 85
		return -EINVAL;
......
159 159
	return handle->id;
160 160

  
161 161
error:
162
	closeret = fmt->close_trace(td);
163
	if (closeret) {
164
		fprintf(stderr, "Error in close_trace callback\n");
165
	}
162
	if (handle)
163
		bt_context_remove_trace(ctx, handle->id);
166 164
end:
167 165
	return ret;
168 166
}
169
- 
(2-2/2)