From: Benjamin Poirier Date: Mon, 24 Aug 2009 13:21:54 +0000 (-0400) Subject: Fix use after free of name_tables X-Git-Tag: v0.12.20~40 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6e57d9b698333e4b5d2c644aacd56ac7dc659aca;p=lttv.git Fix use after free of name_tables Signed-off-by: Benjamin Poirier --- diff --git a/lttv/lttv/state.c b/lttv/lttv/state.c index 8b5f3e70..fc49ffc1 100644 --- a/lttv/lttv/state.c +++ b/lttv/lttv/state.c @@ -2128,8 +2128,8 @@ free_name_tables(LttvTraceState *tcs) if(name_tables->trap_names) g_free(name_tables->trap_names); if(name_tables->irq_names) g_free(name_tables->irq_names); if(name_tables->soft_irq_names) g_free(name_tables->soft_irq_names); - if(name_tables) g_free(name_tables); - if(name_tables) g_hash_table_destroy(name_tables->kprobe_hash); + g_hash_table_destroy(name_tables->kprobe_hash); + g_free(name_tables); } #ifdef HASH_TABLE_DEBUG