diff options
Diffstat (limited to 'package/network/services/ead/src/tinysrp')
5 files changed, 11 insertions, 13 deletions
diff --git a/package/network/services/ead/src/tinysrp/bn_mul.c b/package/network/services/ead/src/tinysrp/bn_mul.c index d2d9fc5571..92330e5ecf 100644 --- a/package/network/services/ead/src/tinysrp/bn_mul.c +++ b/package/network/services/ead/src/tinysrp/bn_mul.c @@ -68,10 +68,6 @@ int BN_mul(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_CTX *ctx) #if defined(BN_MUL_COMBA) || defined(BN_RECURSION) int i; #endif -#ifdef BN_RECURSION - BIGNUM *t; - int j,k; -#endif #ifdef BN_COUNT printf("BN_mul %d * %d\n",a->top,b->top); diff --git a/package/network/services/ead/src/tinysrp/clitest.c b/package/network/services/ead/src/tinysrp/clitest.c index faaa5dd90d..338f41ff4e 100644 --- a/package/network/services/ead/src/tinysrp/clitest.c +++ b/package/network/services/ead/src/tinysrp/clitest.c @@ -50,8 +50,6 @@ main() int index; struct t_client * tc; struct t_preconf *tcp; - struct t_num n; - struct t_num g; struct t_num s; struct t_num B; char username[MAXUSERLEN]; diff --git a/package/network/services/ead/src/tinysrp/t_client.c b/package/network/services/ead/src/tinysrp/t_client.c index ebdd203af5..692215a369 100644 --- a/package/network/services/ead/src/tinysrp/t_client.c +++ b/package/network/services/ead/src/tinysrp/t_client.c @@ -58,8 +58,6 @@ t_clientopen(u, n, g, s) int i, validated; struct t_preconf * tpc; - BigInteger nn, gg, n12, r; - validated = 0; if(n->len < MIN_MOD_BYTES) return 0; diff --git a/package/network/services/ead/src/tinysrp/t_conv.c b/package/network/services/ead/src/tinysrp/t_conv.c index d3fe246c41..3be6d85b54 100644 --- a/package/network/services/ead/src/tinysrp/t_conv.c +++ b/package/network/services/ead/src/tinysrp/t_conv.c @@ -161,7 +161,7 @@ t_fromb64(dst, src) break; } - while(a[j] == 0 && j <= size) + while(j <= size && a[j] == 0) ++j; memcpy(dst, a + j, size - j + 1); diff --git a/package/network/services/ead/src/tinysrp/tphrase.c b/package/network/services/ead/src/tinysrp/tphrase.c index 1aede0c832..0ab1e085c1 100644 --- a/package/network/services/ead/src/tinysrp/tphrase.c +++ b/package/network/services/ead/src/tinysrp/tphrase.c @@ -62,7 +62,6 @@ void doit(char *name) { char passphrase[128], passphrase1[128]; FILE *f; - struct t_conf *tc; struct t_confent *tcent; struct t_pw eps_passwd; @@ -152,7 +151,8 @@ t_changepw(pwname, diff) if((bakfp = fopen(bakfile2, "wb")) == NULL && (unlink(bakfile2) < 0 || (bakfp = fopen(bakfile2, "wb")) == NULL)) { fclose(passfp); - fclose(bakfp); + free(bakfile); + free(bakfile2); return -1; } @@ -169,10 +169,16 @@ t_changepw(pwname, diff) #ifdef USE_RENAME unlink(bakfile); - if(rename(pwname, bakfile) < 0) + if(rename(pwname, bakfile) < 0) { + free(bakfile); + free(bakfile2); return -1; - if(rename(bakfile2, pwname) < 0) + } + if(rename(bakfile2, pwname) < 0) { + free(bakfile); + free(bakfile2); return -1; + } #else unlink(bakfile); link(pwname, bakfile); |