From 3a1a4c4fc7ff1233cda8da19c93cc4c7ddd7e589 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Thu, 21 Feb 2013 21:29:56 +0000 Subject: [PATCH] bos: Don't set up the conenction twice in AddKey AddKey calls GetConn twice - once at the start of the function, and then again immediately before calling BOZO_AddKey. This leaks a connection... Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9230 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 6ef224da14da88318ede836a2c80998299c93e2f) Change-Id: I6cbd68a72b041a9638d98481ef793e34b8946abd Reviewed-on: http://gerrit.openafs.org/10859 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Jeffrey Altman Reviewed-by: Michael Meffie Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand --- src/bozo/bos.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/bozo/bos.c b/src/bozo/bos.c index f4d8bfaf4..45624b8be 100644 --- a/src/bozo/bos.c +++ b/src/bozo/bos.c @@ -856,7 +856,6 @@ AddKey(struct cmd_syndesc *as, void *arock) */ ka_StringToKey(buf, tcell, &tkey); } - tconn = GetConn(as, 1); code = BOZO_AddKey(tconn, temp, ktc_to_bozoptr(&tkey)); if (code) { printf("bos: failed to set key %d (%s)\n", temp, em(code)); -- 2.39.5