vnc: g_realloc() can't fail, bury dead error handling
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
e75bef035a
commit
4b3be73006
4
ui/vnc.c
4
ui/vnc.c
@ -659,10 +659,6 @@ void buffer_reserve(Buffer *buffer, size_t len)
|
||||
if ((buffer->capacity - buffer->offset) < len) {
|
||||
buffer->capacity += (len + 1024);
|
||||
buffer->buffer = g_realloc(buffer->buffer, buffer->capacity);
|
||||
if (buffer->buffer == NULL) {
|
||||
fprintf(stderr, "vnc: out of memory\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user