[Spice-devel] [PATCH 1/2] Add compress_buf_free function

Frediano Ziglio fziglio at redhat.com
Fri Jun 3 15:40:22 UTC 2016


dcc-encoders should be in change of allocate and free the structure
don't put internal assumptions (which functions are used for memory
management) in different files.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/dcc-encoders.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/server/dcc-encoders.h b/server/dcc-encoders.h
index 0d3e96a9..88351dc 100644
--- a/server/dcc-encoders.h
+++ b/server/dcc-encoders.h
@@ -63,6 +63,11 @@ struct RedCompressBuf {
     RedCompressBuf *send_next;
 };
 
+static inline void compress_buf_free(RedCompressBuf *buf)
+{
+    g_free(buf);
+}
+
 typedef struct GlzSharedDictionary {
     RingItem base;
     GlzEncDictContext *dict;
-- 
2.7.4



More information about the Spice-devel mailing list