Commit 50987bec authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull tracing fix from Steven Rostedt:
 "Fix a memory link in dyn_event_release().

  An error path exited the function before freeing the allocated 'argv'
  variable"

* tag 'trace-v5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  tracing/dynevent: Fix a memory leak in an error handling path
parents eebe426d 8db403b9
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -63,8 +63,10 @@ int dyn_event_release(const char *raw_command, struct dyn_event_operations *type
		event = p + 1;
		*p = '\0';
	}
	if (event[0] == '\0')
		return -EINVAL;
	if (event[0] == '\0') {
		ret = -EINVAL;
		goto out;
	}

	mutex_lock(&event_mutex);
	for_each_dyn_event_safe(pos, n) {