The branch, master has been updated
via 28461f2c4332e34cd50ed0cfd947b8ac1bc5fe08 (commit)
from 586898dc1fc60d5aad39bb939c5d6255a0062fc3 (commit)
- Log -----------------------------------------------------------------
commit 28461f2c4332e34cd50ed0cfd947b8ac1bc5fe08
Author: Tim Blechmann <[email protected]>
AuthorDate: Wed Jun 25 10:14:42 2025 +0800
Commit: Marton Balint <[email protected]>
CommitDate: Sat Nov 8 21:48:00 2025 +0000
libavutil: fix memory leak of drmVersion
address sanitizer showed some leaks of drmVersion structs.
`vaapi_device_create` did not call drmFreeVersion in all possible code
paths.
diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
index 51af22a607..753dcf8905 100644
--- a/libavutil/hwcontext_vaapi.c
+++ b/libavutil/hwcontext_vaapi.c
@@ -1815,6 +1815,7 @@ static int vaapi_device_create(AVHWDeviceContext *ctx,
const char *device,
"Failed to get DRM device info for device
%d.\n", n);
close(priv->drm_fd);
priv->drm_fd = -1;
+ drmFreeVersion(info);
continue;
}
@@ -1826,6 +1827,7 @@ static int vaapi_device_create(AVHWDeviceContext *ctx,
const char *device,
drmFreeDevice(&device);
close(priv->drm_fd);
priv->drm_fd = -1;
+ drmFreeVersion(info);
continue;
}
av_log(ctx, AV_LOG_VERBOSE, "Trying to use "
@@ -1833,6 +1835,7 @@ static int vaapi_device_create(AVHWDeviceContext *ctx,
const char *device,
"with matching vendor id (%s).\n",
n, vendor_id->value);
drmFreeDevice(&device);
+ drmFreeVersion(info);
break;
}
drmFreeVersion(info);
-----------------------------------------------------------------------
Summary of changes:
libavutil/hwcontext_vaapi.c | 3 +++
1 file changed, 3 insertions(+)
hooks/post-receive
--
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]