summaryrefslogtreecommitdiff
path: root/nouveau/nouveau_resource.c
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2010-01-12 15:31:28 +0100
committerFrancisco Jerez <currojerez@riseup.net>2010-01-31 16:09:03 +0100
commit55ba98fadfb8909d23d6f810285504abd173f0ad (patch)
tree4a1b67927c5060f67cb05349508b1d2dddcf11a6 /nouveau/nouveau_resource.c
parent44a0e0a099eeeb6501359f08449dcaa5e9899398 (diff)
nouveau: add nouveau_resource_destroy
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Diffstat (limited to 'nouveau/nouveau_resource.c')
-rw-r--r--nouveau/nouveau_resource.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/nouveau/nouveau_resource.c b/nouveau/nouveau_resource.c
index 6bef7567..7acaf7db 100644
--- a/nouveau/nouveau_resource.c
+++ b/nouveau/nouveau_resource.c
@@ -41,6 +41,15 @@ nouveau_resource_init(struct nouveau_resource **heap,
return 0;
}
+void
+nouveau_resource_destroy(struct nouveau_resource **heap)
+{
+ if (!*heap)
+ return;
+ free(*heap);
+ *heap = NULL;
+}
+
int
nouveau_resource_alloc(struct nouveau_resource *heap, unsigned size, void *priv,
struct nouveau_resource **res)