Skip to content

Commit f104876

Browse files
JuliaLawallairlied
authored andcommitted
drivers/gpu/drm/savage/savage_state.c: add missing kfree
Most of the error handling code in this function frees the buffers kcmd_addr, kvb_addr, and kbox_addr allocated at the beginning of this function. These two branches are changed to do the same. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Dave Airlie <airlied@redhat.com>
1 parent f48bb04 commit f104876

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎drivers/gpu/drm/savage/savage_state.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,8 @@ int savage_bci_cmdbuf(struct drm_device *dev, void *data, struct drm_file *file_
10571057
DRM_ERROR("indexed drawing command extends "
10581058
"beyond end of command buffer\n");
10591059
DMA_FLUSH();
1060-
return -EINVAL;
1060+
ret = -EINVAL;
1061+
goto done;
10611062
}
10621063
/* fall through */
10631064
case SAVAGE_CMD_DMA_PRIM:
@@ -1076,7 +1077,7 @@ int savage_bci_cmdbuf(struct drm_device *dev, void *data, struct drm_file *file_
10761077
cmdbuf->vb_stride,
10771078
cmdbuf->nbox, cmdbuf->box_addr);
10781079
if (ret != 0)
1079-
return ret;
1080+
goto done;
10801081
first_draw_cmd = NULL;
10811082
}
10821083
}

0 commit comments

Comments
 (0)