diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-03-11 12:13:33 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-03-11 12:14:08 +0100 |
commit | d94cb8e1ba324ba5e534b6cddb604a58d7e15138 (patch) | |
tree | 0297b8b53fa7d778d6c4a89f2ef21cad1c226409 /server/red_client_cache.h | |
parent | af4672326bdd88fbdbc4bd62a2a7563dc7d2077d (diff) | |
download | spice-d94cb8e1ba324ba5e534b6cddb604a58d7e15138.tar.gz spice-d94cb8e1ba324ba5e534b6cddb604a58d7e15138.tar.xz spice-d94cb8e1ba324ba5e534b6cddb604a58d7e15138.zip |
Use spice allocator in server/
Diffstat (limited to 'server/red_client_cache.h')
-rw-r--r-- | server/red_client_cache.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/server/red_client_cache.h b/server/red_client_cache.h index 3db0ce9c..91eaf4e9 100644 --- a/server/red_client_cache.h +++ b/server/red_client_cache.h @@ -82,10 +82,7 @@ static int FUNC_NAME(add)(CHANNEL *channel, uint64_t id, size_t size) CacheItem *item; int key; - item = malloc(sizeof(*item)); - if (!item) { - return FALSE; - } + item = spice_new(CacheItem, 1); channel->VAR_NAME(available) -= size; while (channel->VAR_NAME(available) < 0) { |