mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-20 05:50:12 +01:00
xf86drm: Fix possible memory leak with drmModeGetPropertyPtr()
In drmModeGetPropertyPtr(), from upper error path, it calls free but with just next error path, it does not call. Fix the possible memory leak. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
parent
6a7d1329db
commit
b39377d66a
1 changed files with 1 additions and 1 deletions
|
|
@ -650,7 +650,7 @@ drm_public drmModePropertyPtr drmModeGetProperty(int fd, uint32_t property_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(r = drmMalloc(sizeof(*r))))
|
if (!(r = drmMalloc(sizeof(*r))))
|
||||||
return NULL;
|
goto err_allocs;
|
||||||
|
|
||||||
r->prop_id = prop.prop_id;
|
r->prop_id = prop.prop_id;
|
||||||
r->count_values = prop.count_values;
|
r->count_values = prop.count_values;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue