X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=trunk%2Flttv%2Fltt%2Fevent.c;h=46b68af7e692528935c352f5538e942f69bd5c0a;hb=750eb11ac3adbb2c4c3e6cf5323a523e9da7b8ae;hp=42a623181b1f7d8c47071274dc520fd95ef90600;hpb=c90f61251594be2e5f43357053c213a43c4ccd2f;p=lttv.git diff --git a/trunk/lttv/ltt/event.c b/trunk/lttv/ltt/event.c index 42a62318..46b68af7 100644 --- a/trunk/lttv/ltt/event.c +++ b/trunk/lttv/ltt/event.c @@ -322,13 +322,15 @@ double ltt_event_get_double(LttEvent *e, struct marker_field *f) /***************************************************************************** * The string obtained is only valid until the next read from - * the same tracefile. + * the same tracefile. We reference directly the buffers. ****************************************************************************/ -char *ltt_event_get_string(LttEvent *e, struct marker_field *f) +gchar *ltt_event_get_string(LttEvent *e, struct marker_field *f) { g_assert(f->type == LTT_TYPE_STRING); - return (gchar*)g_strdup((gchar*)(e->data + f->offset)); + //caused memory leaks + //return (gchar*)g_strdup((gchar*)(e->data + f->offset)); + return (gchar*)(e->data + f->offset); }