Commit cd04bb4a authored by Andriy Gelman's avatar Andriy Gelman

avcodec/v4l2_context: Use av_freep()

Reviewed-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: 's avatarAndriy Gelman <andriy.gelman@gmail.com>
parent 8beb9e57
......@@ -685,8 +685,7 @@ void ff_v4l2_context_release(V4L2Context* ctx)
if (ret)
av_log(logger(ctx), AV_LOG_WARNING, "V4L2 failed to unmap the %s buffers\n", ctx->name);
av_free(ctx->buffers);
ctx->buffers = NULL;
av_freep(&ctx->buffers);
}
int ff_v4l2_context_init(V4L2Context* ctx)
......@@ -743,8 +742,7 @@ int ff_v4l2_context_init(V4L2Context* ctx)
error:
v4l2_release_buffers(ctx);
av_free(ctx->buffers);
ctx->buffers = NULL;
av_freep(&ctx->buffers);
return ret;
}
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