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:
Markus Armbruster 2015-02-04 11:26:06 +01:00 committed by Michael Tokarev
parent e75bef035a
commit 4b3be73006

View File

@ -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);
}
}
}