Thread (2 messages) flat view 2 messages, 2 authors, 2019-08-22

Re: [PATCH v2] sock: fix potential memory leak in proto_register()

From: David Miller <davem@davemloft.net>
Date: 2019-08-22 22:44:11
Also in: bpf, lkml

From: zhanglin <redacted>
Date: Wed, 21 Aug 2019 08:42:38 +0800
quoted hunk ↗ jump to hunk
@@ -3243,18 +3245,24 @@ int proto_register(struct proto *prot, int alloc_slab)
 	}
 
 	mutex_lock(&proto_list_mutex);
+	if (assign_proto_idx(prot)) {
+		mutex_unlock(&proto_list_mutex);
+		goto out_free_timewait_sock_slab_name;
+	}
Propagate the error code properly please.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help