about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--091socket.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/091socket.cc b/091socket.cc
index cab57143..79f091b8 100644
--- a/091socket.cc
+++ b/091socket.cc
@@ -52,8 +52,7 @@ socket_t* server_socket(int port) {
   result->fd = socket(AF_INET, SOCK_STREAM, 0);
   if (result->fd < 0) {
     raise << "Failed to create server socket.\n" << end();
-    delete result;
-    return NULL;
+    return result;
   }
   int dummy = 0;
   setsockopt(result->fd, SOL_SOCKET, SO_REUSEADDR, &dummy, sizeof(dummy));