Commit a87d1203 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'probes-fixes-v6.13-rc6' of...

Merge tag 'probes-fixes-v6.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull probes fix from Masami Hiramatsu:
 "Fix to free trace_kprobe objects at a failure path in
  __trace_kprobe_create() function. This fixes a memory leak"

* tag 'probes-fixes-v6.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tracing/kprobes: Fix to free objects when failed to copy a symbol
parents b62cef9a 30c8fd31
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -940,8 +940,10 @@ static int __trace_kprobe_create(int argc, const char *argv[])
		}
		/* a symbol specified */
		symbol = kstrdup(argv[1], GFP_KERNEL);
		if (!symbol)
			return -ENOMEM;
		if (!symbol) {
			ret = -ENOMEM;
			goto error;
		}

		tmp = strchr(symbol, '%');
		if (tmp) {