diff options
author | Gavin Stark <gavin@gstark.com> | 2020-05-20 17:23:14 -0400 |
---|---|---|
committer | XinfengZhang <carl.zhang@intel.com> | 2020-06-09 22:53:31 +0800 |
commit | b4e690fb33cbfb35a12cffe4b655a4045f71aa82 (patch) | |
tree | ec478d2552f024f5d14d81fb9df1d5d30b8db169 /CONTRIBUTING.md | |
parent | a307f426f82fa495c7b14e15e625614f16788d9c (diff) | |
download | libva-b4e690fb33cbfb35a12cffe4b655a4045f71aa82.tar.gz |
Fixes file descriptor leak
If code calls va_isDRI2Connected multiple times there is no protection
against calling open(device_name, O_RDWR) again and losing the reference
to the original file descriptor.
A recent change (bc8a12) calls the method twice each time libva is
initialized, thus causing a leak of device file descriptors.
This change moves the initializing of the fd and auth_type to the
creation of the dri_state and then checks to see if they have already
been initialized. If so, the method va_isDRIConnected returns true
and fills in driver_name.
Diffstat (limited to 'CONTRIBUTING.md')
0 files changed, 0 insertions, 0 deletions