From c271437f4e8f90a25ad6040795f877ea87c35767 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 20 Apr 2018 10:22:15 +0200 Subject: [PATCH] image: add comment Signed-off-by: Maxime Ripard --- src/image.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/image.c b/src/image.c index c3dc3bc..5755ffb 100644 --- a/src/image.c +++ b/src/image.c @@ -78,8 +78,10 @@ VAStatus sunxi_cedrus_CreateImage(VADriverContextP ctx, VAImageFormat *format, obj_img = IMAGE(image->image_id); if (sunxi_cedrus_CreateBuffer(ctx, 0, VAImageBufferType, image->data_size, - 1, NULL, &image->buf) != VA_STATUS_SUCCESS) + 1, NULL, &image->buf) != VA_STATUS_SUCCESS) { + // TODO: free image object return VA_STATUS_ERROR_ALLOCATION_FAILED; + } obj_img->buf = image->buf; return VA_STATUS_SUCCESS;