diff options
author | rr- <rr-@sakuya.pl> | 2016-10-04 00:20:07 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-10-04 13:23:11 +0200 |
commit | ba3f6f3779ff12a80e61b4e95d8e70f666b6c4e0 (patch) | |
tree | 4bf706240f720893f1de6599373ec2155afd0e5c /video | |
parent | 1648ff8a0f18e1c1a5e979084148cc7ecf195984 (diff) | |
download | mpv-ba3f6f3779ff12a80e61b4e95d8e70f666b6c4e0.tar.bz2 mpv-ba3f6f3779ff12a80e61b4e95d8e70f666b6c4e0.tar.xz |
vo_drm: fix tiny memory leak
Diffstat (limited to 'video')
-rw-r--r-- | video/out/drm_common.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/video/out/drm_common.c b/video/out/drm_common.c index 4e9f497c6c..8a4e017d28 100644 --- a/video/out/drm_common.c +++ b/video/out/drm_common.c @@ -190,13 +190,18 @@ bool kms_setup(struct kms *kms, const char *device_path, int connector_id, int m } if (!setup_connector(kms, res, connector_id)) - return false; + goto err; if (!setup_crtc(kms, res)) - return false; + goto err; if (!setup_mode(kms, mode_id)) - return false; + goto err; + drmModeFreeResources(res); return true; + +err: + drmModeFreeResources(res); + return false; } void kms_destroy(struct kms *kms) |