Fix: directory-handle: use of free'd handle on fstat() error
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 18 Feb 2020 01:13:49 +0000 (20:13 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 19 Feb 2020 22:47:41 +0000 (17:47 -0500)
commit469df82b291713da80a728e57a85d5518c87f11a
tree588aa7aefe5faafba991c278dc3b2e9231fa4611
parentc7855e883697c410b9bd5c867f1bf38cdcbd50c3
Fix: directory-handle: use of free'd handle on fstat() error

On an error to fstat a directory handle, a directory handle is
released and is still initialized as if the error had not occurred.

Return NULL early from lttng_directory_handle_create_from_dirfd()
to prevent those erroneous accesses.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ia2a3bb1cfe8c90d3f7f87a68286a9b8524694d3c
src/common/compat/directory-handle.c
This page took 0.026789 seconds and 4 git commands to generate.