Fix use after free of name_tables
authorBenjamin Poirier <benjamin.poirier@polymtl.ca>
Mon, 24 Aug 2009 13:21:54 +0000 (09:21 -0400)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Wed, 16 Sep 2009 04:42:12 +0000 (00:42 -0400)
Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
lttv/lttv/state.c

index 8b5f3e702b0aaf2991c1515b4980fd5bfdad3d41..fc49ffc12be4c532fea0a9075ff7f159c2450310 100644 (file)
@@ -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
This page took 0.033752 seconds and 4 git commands to generate.