if (path) {
td = fmt->open_trace(path, O_RDONLY, packet_seek, NULL);
if (!td) {
- fprintf(stderr, "[error] [Context] Cannot open_trace of the format %s .\n\n",
+ fprintf(stderr, "[warning] [Context] Cannot open_trace of the format %s .\n\n",
path);
ret = -1;
goto end;
/* Remove from containers */
trace_collection_remove(ctx->tc, handle->td);
- g_hash_table_remove(ctx->trace_handles,
- (gpointer) (unsigned long) handle_id);
-
/* Close the trace */
handle->format->close_trace(handle->td);
- /* Destory the handle */
- bt_trace_handle_destroy(handle);
+ /* Remove and free the handle */
+ g_hash_table_remove(ctx->trace_handles,
+ (gpointer) (unsigned long) handle_id);
+
}
static