From: Simon Wilkinson Date: Thu, 21 Feb 2013 21:29:56 +0000 (+0000) Subject: bos: Don't set up the conenction twice in AddKey X-Git-Tag: upstream/1.8.0_pre1^2~1474 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=6ef224da14da88318ede836a2c80998299c93e2f;p=packages%2Fo%2Fopenafs.git 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 Change-Id: I5c593de56e7f61fb21b973a34bea1a5b4f4a3177 Reviewed-on: http://gerrit.openafs.org/9230 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear --- diff --git a/src/bozo/bos.c b/src/bozo/bos.c index 24b9dc398..34c4fd335 100644 --- a/src/bozo/bos.c +++ b/src/bozo/bos.c @@ -841,7 +841,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));