summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-09-22 14:35:14 +0200
committerHans de Goede <hdegoede@redhat.com>2011-09-22 14:36:06 +0200
commit16d8bda4ec2966643aa7fd2623af7ba47095b954 (patch)
tree0b7f3d140fc5f68e46c82b43b76b005bf1b23b30
parentba77df235d779ec2d8fa069fb7da699decb4c3ed (diff)
vdagentd: Fix a memory leak on agent message parsing errors
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r--src/vdagentd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vdagentd.c b/src/vdagentd.c
index 0cb7f1e..291e4e3 100644
--- a/src/vdagentd.c
+++ b/src/vdagentd.c
@@ -559,6 +559,7 @@ void agent_read_complete(struct udscs_connection **connp,
fprintf(logfile,
"guest xorg resolution message has wrong size, disconnecting agent\n");
udscs_destroy_connection(connp);
+ free(data);
return;
}
@@ -573,6 +574,7 @@ void agent_read_complete(struct udscs_connection **connp,
case VDAGENTD_CLIPBOARD_RELEASE:
if (do_agent_clipboard(*connp, header, data)) {
udscs_destroy_connection(connp);
+ free(data);
return;
}
break;