summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2023-02-09 14:55:00 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2023-02-20 14:56:42 +0100
commit73ce73c30ba9ae4d90fdfad7ebe9104001d5d851 (patch)
treeb18404055c4f885f3922d40fb9201aaf3cd22453 /tools/perf/scripts/python
parentc88b946af120029944f4f78fe156bd9361698e97 (diff)
fbdev: Transfer video= option strings to caller; clarify ownership
In fb_get_options(), always duplicate the returned option string and transfer ownership of the memory to the function's caller. Until now, only the global option string got duplicated and transferred to the caller; the per-driver options were owned by fb_get_options(). In the end, it was impossible for the function's caller to detect if it had to release the string's memory buffer. Hence, all calling drivers leak the memory buffer. The leaks have existed ever since, but drivers only call fb_get_option() once as part of module initialization. So the amount of leaked memory is not significant. Fix the semantics of fb_get_option() by unconditionally transferring ownership of the memory buffer to the caller. Later patches can resolve the memory leaks in the fbdev drivers. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230209135509.7786-3-tzimmermann@suse.de
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions