Commit 80da227c authored by Michael Niedermayer's avatar Michael Niedermayer

cmdutils_opencl: Use av_malloc_array()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 46563af7
......@@ -224,7 +224,7 @@ int opt_opencl_bench(void *optctx, const char *opt, const char *arg)
av_log(NULL, AV_LOG_ERROR, "No OpenCL device detected!\n");
return AVERROR(EINVAL);
}
if (!(devices = av_malloc(sizeof(OpenCLDeviceBenchmark) * nb_devices))) {
if (!(devices = av_malloc_array(nb_devices, sizeof(OpenCLDeviceBenchmark)))) {
av_log(NULL, AV_LOG_ERROR, "Could not allocate buffer\n");
return AVERROR(ENOMEM);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment