[Spice-commits] 3 commits - server/dispatcher.h server/mjpeg_encoder.c server/red_dispatcher.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Fri Oct 23 04:10:50 PDT 2015
server/dispatcher.h | 1 -
server/mjpeg_encoder.c | 1 +
server/red_dispatcher.c | 3 ++-
3 files changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 90a08ebae83087ac3fd373e2152911433f2ae53c
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Wed Oct 14 13:18:35 2015 +0100
remove small leak in MJPEG code
cinfo.dest is allocated in spice_jpeg_mem_dest but never freed.
Note that jpeg_destroy_compress does not free this field as is
supposed to be a buffer provided by jpeg caller.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/server/mjpeg_encoder.c b/server/mjpeg_encoder.c
index ecb46df..4d00454 100644
--- a/server/mjpeg_encoder.c
+++ b/server/mjpeg_encoder.c
@@ -226,6 +226,7 @@ MJpegEncoder *mjpeg_encoder_new(uint64_t starting_bit_rate,
void mjpeg_encoder_destroy(MJpegEncoder *encoder)
{
+ free(encoder->cinfo.dest);
jpeg_destroy_compress(&encoder->cinfo);
free(encoder->row);
free(encoder);
commit a2ebe610c1c9cb72db0364248bb2eba519020fd0
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Tue Oct 13 16:39:46 2015 +0100
reduce locking time in async_command_alloc
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/server/red_dispatcher.c b/server/red_dispatcher.c
index 4187704..83aace4 100644
--- a/server/red_dispatcher.c
+++ b/server/red_dispatcher.c
@@ -335,9 +335,10 @@ static AsyncCommand *async_command_alloc(RedDispatcher *dispatcher,
{
AsyncCommand *async_command = spice_new0(AsyncCommand, 1);
- pthread_mutex_lock(&dispatcher->async_lock);
async_command->cookie = cookie;
async_command->message = message;
+
+ pthread_mutex_lock(&dispatcher->async_lock);
ring_add(&dispatcher->async_commands, &async_command->link);
pthread_mutex_unlock(&dispatcher->async_lock);
spice_debug("%p", async_command);
commit 78c8203f16fa6e13198aefb8751c651d58f3f6f9
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Tue Oct 13 16:27:53 2015 +0100
removed unused recv_core field
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/server/dispatcher.h b/server/dispatcher.h
index 2c165aa..210e317 100644
--- a/server/dispatcher.h
+++ b/server/dispatcher.h
@@ -41,7 +41,6 @@ typedef struct DispatcherMessage {
} DispatcherMessage;
struct Dispatcher {
- SpiceCoreInterface *recv_core;
int recv_fd;
int send_fd;
pthread_t self;
More information about the Spice-commits
mailing list