mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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:
parent
e589728b6f
commit
ae878b172e
4 changed files with 11 additions and 11 deletions
8
ui/vnc.c
8
ui/vnc.c
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue