projects
/
platform
/
upstream
/
libdrm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a7d132
)
xf86drm: Fix possible memory leak with drmModeGetPropertyPtr()
author
Seung-Woo Kim
<sw0312.kim@samsung.com>
Mon, 29 Apr 2019 09:10:52 +0000
(18:10 +0900)
committer
Eric Engestrom
<eric.engestrom@intel.com>
Fri, 3 May 2019 11:47:42 +0000
(12:47 +0100)
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>
xf86drmMode.c
patch
|
blob
|
history
diff --git
a/xf86drmMode.c
b/xf86drmMode.c
index
c878d9e
..
207d7be
100644
(file)
--- a/
xf86drmMode.c
+++ b/
xf86drmMode.c
@@
-650,7
+650,7
@@
drm_public drmModePropertyPtr drmModeGetProperty(int fd, uint32_t property_id)
}
if (!(r = drmMalloc(sizeof(*r))))
-
return NULL
;
+
goto err_allocs
;
r->prop_id = prop.prop_id;
r->count_values = prop.count_values;