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>
Tue, 17 May 2022 17:41:49 +0000 (13:41 -0400)
commita9cfc0f36bf8ade64df08392b03a9f15409dc01b
tree65066d43a5d51fab5138d3d5749ad37fe1c208f9
parent8f981892936f6af4f95adf6b6dd81f0463f3ba7c
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.cpp
This page took 0.026683 seconds and 5 git commands to generate.