ui/vnc: Fix use of free() instead of g_free()

Please note that mechlist still uses malloc / strdup / free.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Stefan Weil 2011-10-07 21:15:20 +02:00 committed by Anthony Liguori
parent e589728b6f
commit ae878b172e
4 changed files with 11 additions and 11 deletions

View file

@ -2911,7 +2911,7 @@ int vnc_display_open(DisplayState *ds, const char *display)
if ((saslErr = sasl_server_init(NULL, "qemu")) != SASL_OK) {
fprintf(stderr, "Failed to initialize SASL auth %s",
sasl_errstring(saslErr, NULL, NULL));
free(vs->display);
g_free(vs->display);
vs->display = NULL;
return -1;
}
@ -2925,7 +2925,7 @@ int vnc_display_open(DisplayState *ds, const char *display)
else
vs->lsock = inet_connect(display, SOCK_STREAM);
if (-1 == vs->lsock) {
free(vs->display);
g_free(vs->display);
vs->display = NULL;
return -1;
} else {
@ -2946,10 +2946,10 @@ int vnc_display_open(DisplayState *ds, const char *display)
vs->lsock = inet_listen(display, dpy, 256, SOCK_STREAM, 5900);
}
if (-1 == vs->lsock) {
free(dpy);
g_free(dpy);
return -1;
} else {
free(vs->display);
g_free(vs->display);
vs->display = dpy;
}
}