From f0e2f7ee079e14ef7768dd22d3716fa210107960 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 8 Apr 2014 15:33:10 -0400 Subject: [PATCH] lib/socket: Bugfix, tried to free a static variable, this provoked a warning when compiling. Signed-off-by: Lucas Bajolet --- lib/socket/socket_c.nit | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/socket/socket_c.nit b/lib/socket/socket_c.nit index 11bda16..1d56bcb 100644 --- a/lib/socket/socket_c.nit +++ b/lib/socket/socket_c.nit @@ -124,13 +124,11 @@ extern FFSocket `{ S_DESCRIPTOR* `} static char c[1024]; int n = read(*recv, c, 1024); if(n < 0) { - free(c); return NativeString_to_s_with_length("",0); } char* ret = malloc(n + 1); memcpy(ret, c, n); ret[n] = '\0'; - free(c); return NativeString_to_s_with_length(ret, n); `} -- 1.7.9.5