diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-03-10 21:11:46 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-03-11 12:14:08 +0100 |
commit | af4672326bdd88fbdbc4bd62a2a7563dc7d2077d (patch) | |
tree | 0dffc6a00dd9de1539149889e67c22e9a5b279f3 /common/region.c | |
parent | 440ac41cf1dc09a4dde43790f9f9d5a83bfb4a45 (diff) | |
download | spice-af4672326bdd88fbdbc4bd62a2a7563dc7d2077d.tar.gz spice-af4672326bdd88fbdbc4bd62a2a7563dc7d2077d.tar.xz spice-af4672326bdd88fbdbc4bd62a2a7563dc7d2077d.zip |
Use the spice allocator in common/
Diffstat (limited to 'common/region.c')
-rw-r--r-- | common/region.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/region.c b/common/region.c index 7edcb5a1..95ac8ca5 100644 --- a/common/region.c +++ b/common/region.c @@ -23,6 +23,7 @@ #include "region.h" #include "rect.h" +#include "mem.h" #define ASSERT(x) if (!(x)) { \ printf("%s: ASSERT %s failed\n", __FUNCTION__, #x); \ @@ -352,7 +353,7 @@ SpiceRect *region_dup_rects(const QRegion *rgn, uint32_t *num_rects) if (num_rects) { *num_rects = n; } - rects = (SpiceRect *)malloc(sizeof(SpiceRect)*n); + rects = spice_new(SpiceRect, n); for (i = 0; i < n; i++) { rects[i].left = boxes[i].x1; rects[i].top = boxes[i].y1; |