Commit e3045918 authored by Michael Spang's avatar Michael Spang Committed by Commit Bot

ozone: drm: Fix memory leak in IsDrmModuleName()

We need to call drmFreeVersion().

Bug: none
Test: compile

Change-Id: I0c819d989a15dc2a5ddda7f9e37311d860f5afa1
Reviewed-on: https://chromium-review.googlesource.com/1146980Reviewed-by: default avatarDaniele Castagna <dcastagna@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577215}
parent 1b1820da
......@@ -212,7 +212,9 @@ bool IsDrmModuleName(const int fd, const std::string& name) {
// and tested.
drmVersionPtr drm_version = drmGetVersion(fd);
DCHECK(drm_version) << "Can't get version for drm device.";
return std::string(drm_version->name) == name;
bool result = std::string(drm_version->name) == name;
drmFreeVersion(drm_version);
return result;
}
bool AreDisplayModesEqual(const DisplayMode_Params& lhs,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment