Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: benjamin.poirier@polymtl.ca (Benjamin Poirier)
Subject: [ltt-dev] [PATCH] Fix use after free of name_tables
Date: Mon, 24 Aug 2009 09:21:54 -0400	[thread overview]
Message-ID: <4A9293F2.5070205@polymtl.ca> (raw)

Signed-off-by: Benjamin Poirier <benjamin.poirier at polymtl.ca>
---
 lttv/lttv/state.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lttv/lttv/state.c b/lttv/lttv/state.c
index 8b5f3e7..fc49ffc 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
-- 
1.6.3.3






                 reply	other threads:[~2009-08-24 13:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A9293F2.5070205@polymtl.ca \
    --to=benjamin.poirier@polymtl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox