From: yangxx Date: Fri, 12 Sep 2003 17:30:49 +0000 (+0000) Subject: git-svn-id: http://ltt.polymtl.ca/svn@235 04897980-b3bd-0310-b5e0-8ef037075253 X-Git-Tag: v0.12.20~3254 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=7525f9e581c113c8bbfabed5454de8e808401de1;p=lttv.git git-svn-id: ltt.polymtl.ca/svn@235 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/include/ltt/ltt-private.h b/ltt/branches/poly/include/ltt/ltt-private.h index 55a2e0e1..94bc1ebd 100644 --- a/ltt/branches/poly/include/ltt/ltt-private.h +++ b/ltt/branches/poly/include/ltt/ltt-private.h @@ -137,6 +137,7 @@ struct _LttTracefile{ LttTime prev_block_end_time; //the end time of previous block LttTime prev_event_time; //the time of the previous event + LttEvent an_event; }; struct _LttTrace{ diff --git a/ltt/branches/poly/ltt/tracefile.c b/ltt/branches/poly/ltt/tracefile.c index bf2af685..05978a48 100644 --- a/ltt/branches/poly/ltt/tracefile.c +++ b/ltt/branches/poly/ltt/tracefile.c @@ -149,7 +149,6 @@ void ltt_tracefile_open_control(LttTrace *t, char * control_name) }else if(ev->event_id == TRACE_BLOCK_END){ break; }else g_error("Not valid facilities trace file\n"); - g_free(ev); } } } @@ -705,7 +704,6 @@ void ltt_tracefile_seek_time(LttTracefile *t, LttTime time) g_print("End of file\n"); return; } - g_free(ev); lttTime = getEventTime(t); err = timecmp(<tTime, &time); if(err >= 0)return; @@ -755,7 +753,7 @@ void ltt_tracefile_seek_time(LttTracefile *t, LttTime time) LttEvent *ltt_tracefile_read(LttTracefile *t) { - LttEvent * lttEvent = (LttEvent *)g_new(LttEvent, 1); + LttEvent * lttEvent = &t->an_event; int err; if(t->cur_event_pos == t->buffer + t->block_size){