Skip to content
  • Masami Hiramatsu's avatar
    trace_kprobes: Fix a memory leak bug and check kstrdup() return value · ba8665d7
    Masami Hiramatsu authored
    
    
    Fix a memory leak case in create_trace_probe(). When an argument
    is too long (> MAX_ARGSTR_LEN), it just jumps to error path. In
    that case tp->args[i].name is not released.
    This also fixes a bug to check kstrdup()'s return value.
    
    Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
    Cc: systemtap <systemtap@sources.redhat.com>
    Cc: DLE <dle-develop@lists.sourceforge.net>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: Jim Keniston <jkenisto@us.ibm.com>
    Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
    Cc: Christoph Hellwig <hch@infradead.org>
    Cc: Frank Ch. Eigler <fche@redhat.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Jason Baron <jbaron@redhat.com>
    Cc: K.Prasad <prasad@linux.vnet.ibm.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    LKML-Reference: <20091201001919.10235.56455.stgit@harusame>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    ba8665d7