Fix: lttng-snapshot: use after free of max size argument
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 17 May 2022 17:41:49 +0000 (13:41 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 18 May 2022 14:42:43 +0000 (10:42 -0400)
commit82e96063904edc14bfca6aee203099760e08b1c0
treeeb8a221e7bbf008332f125be237c09131b40d869
parent9b4b96c697028c9b7253de664f4f7a9b834a52ac
Fix: lttng-snapshot: use after free of max size argument

gcc 12.1.0 reports:

commands/snapshot.cpp: In function ‘int cmd_snapshot(int, const char**)’:
../../../src/common/error.hpp:139:32: error: pointer ‘max_size_arg’ may be used after ‘void free(void*)’ [-Werror=use-after-free]

free max_size_arg on both paths.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I3775e835e10b364f32f4797afb9c090ac4dc133c
src/bin/lttng/commands/snapshot.c
This page took 0.02554 seconds and 4 git commands to generate.