Skip to content

Commit

Permalink
drivers/gpu/drm/savage/savage_state.c: add missing kfree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Julia Lawall authored and Dave Airlie committed Mar 20, 2012
1 parent f48bb04 commit f104876
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/gpu/drm/savage/savage_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,8 @@ int savage_bci_cmdbuf(struct drm_device *dev, void *data, struct drm_file *file_
DRM_ERROR("indexed drawing command extends "
"beyond end of command buffer\n");
DMA_FLUSH();
return -EINVAL;
ret = -EINVAL;
goto done;
}
/* fall through */
case SAVAGE_CMD_DMA_PRIM:
Expand All @@ -1076,7 +1077,7 @@ int savage_bci_cmdbuf(struct drm_device *dev, void *data, struct drm_file *file_
cmdbuf->vb_stride,
cmdbuf->nbox, cmdbuf->box_addr);
if (ret != 0)
return ret;
goto done;
first_draw_cmd = NULL;
}
}
Expand Down

0 comments on commit f104876

Please sign in to comment.