Thread (5 messages) 5 messages, 3 authors, 2011-08-11
STALE5420d

[PATCH] net/netlabel/netlabel_kapi.c: add missing cleanup code

From: Julia Lawall <hidden>
Date: 2011-08-11 09:40:42
Also in: kernel-janitors, lkml
Subsystem: networking [general], networking [labeled] (netlabel, labeled ipsec, secmark), the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Paul Moore, Linus Torvalds

From: Julia Lawall <redacted>

Use the same cleanup code for the failure of kzalloc as for the failure of
kstrdup just below.

Signed-off-by: Julia Lawall <redacted>

---
 net/netlabel/netlabel_kapi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netlabel/netlabel_kapi.c b/net/netlabel/netlabel_kapi.c
index 58107d0..225e12c 100644
--- a/net/netlabel/netlabel_kapi.c
+++ b/net/netlabel/netlabel_kapi.c
@@ -341,7 +341,7 @@ int netlbl_cfg_cipsov4_map_add(u32 doi,
 
 	entry = kzalloc(sizeof(*entry), GFP_ATOMIC);
 	if (entry == NULL)
-		return -ENOMEM;
+		goto cfg_cipsov4_map_add_failure;
 	if (domain != NULL) {
 		entry->domain = kstrdup(domain, GFP_ATOMIC);
 		if (entry->domain == NULL)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help