summaryrefslogtreecommitdiff
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorGavin Stark <gavin@gstark.com>2020-05-20 17:23:14 -0400
committerXinfengZhang <carl.zhang@intel.com>2020-06-09 22:53:31 +0800
commitb4e690fb33cbfb35a12cffe4b655a4045f71aa82 (patch)
treeec478d2552f024f5d14d81fb9df1d5d30b8db169 /CONTRIBUTING.md
parenta307f426f82fa495c7b14e15e625614f16788d9c (diff)
downloadlibva-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