From 77817877ce62981aaa259eb1af16754ca972ba89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 4 Nov 2008 16:05:38 +0000 Subject: [PATCH] * Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28500 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/network/stack/net_socket.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/add-ons/kernel/network/stack/net_socket.cpp b/src/add-ons/kernel/network/stack/net_socket.cpp index 537f516cc6..722bed6dbf 100644 --- a/src/add-ons/kernel/network/stack/net_socket.cpp +++ b/src/add-ons/kernel/network/stack/net_socket.cpp @@ -119,16 +119,14 @@ create_socket(int family, int type, int protocol, net_socket_private **_socket) link)); status_t status = get_domain_protocols(socket); - if (status < B_OK) - goto err2; + if (status < B_OK) { + mutex_destroy(&socket->lock); + delete socket; + return status; + } *_socket = socket; return B_OK; - -err2: - mutex_destroy(&socket->lock); - delete socket; - return status; }