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>
Tue, 18 Feb 2020 20:43:55 +0000 (15:43 -0500)
commitb2081a0f39bce45b3d1cf063308a9b77712f1a9f
treeac9ae18c995c477fddc838ac791dc6847d187c24
parent19efdf659e29ec34a27c304ccbf7ad6ff8e26337
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.024828 seconds and 4 git commands to generate.