Skip to content

Commit

Permalink
Fix ignoring return value warning in WPEDisplayDRM::findDevice()
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=268544

Reviewed by Carlos Garcia Campos.

The 273896@main introduces an wrong use of fd.release(). This
leads in a build warning error and a potential file descriptor leak.
Use 'fd = { };' instead of this to reset as invalid.

* Source/WebKit/WPEPlatform/wpe/drm/WPEDisplayDRM.cpp:
(findDevice):

Canonical link: https://commits.webkit.org/273902@main
  • Loading branch information
psaavedra committed Feb 1, 2024
1 parent 69fa6f6 commit 05b8197
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WebKit/WPEPlatform/wpe/drm/WPEDisplayDRM.cpp
Expand Up @@ -95,7 +95,7 @@ static UnixFileDescriptor findDevice(GError** error)
if (resources && resources->count_crtcs && resources->count_connectors && resources->count_encoders)
break;

fd.release();
fd = { };
}

drmFreeDevices(devices, numDevices);
Expand Down

0 comments on commit 05b8197

Please sign in to comment.