From 4b3be73006d5d65d44bd482cc6e3cf2f4ab12c34 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 4 Feb 2015 11:26:06 +0100 Subject: [PATCH] vnc: g_realloc() can't fail, bury dead error handling Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Gonglei Reviewed-by: Thomas Huth Signed-off-by: Michael Tokarev --- ui/vnc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index a742c90..02552ee 100644 --- a/ui/vnc.c +++ b/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); - } } } -- 2.7.4