Explorar el Código

BSocket: fix wrong error path in BSocket_Init

ambrop7 hace 15 años
padre
commit
e1965b05c3
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      system/BSocket.c

+ 3 - 2
system/BSocket.c

@@ -621,15 +621,16 @@ int BSocket_Init (BSocket *bs, BReactor *bsys, int domain, int type)
     // initialize event backend
     if (!init_event_backend(bs)) {
         DEBUG("WARNING: init_event_backend failed");
-        goto fail1;
+        goto fail2;
     }
     
     DebugObject_Init(&bs->d_obj);
     
     return 0;
     
-fail1:
+fail2:
     BPending_Free(&bs->job);
+fail1:
     close_socket(fd);
 fail0:
     return -1;