Skip to content

Commit

Permalink
[trivial] clear stack variable by function
Browse files Browse the repository at this point in the history
  • Loading branch information
isle2983 committed Jan 26, 2017
1 parent 9d560f9 commit 178f16b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ecmult_gen_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static void secp256k1_ecmult_gen(const secp256k1_ecmult_gen_context *ctx, secp25
secp256k1_ge_from_storage(&add, &adds);
secp256k1_gej_add_ge(r, r, &add);
}
bits = 0;
secp256k1_int_clear(&bits);
secp256k1_ge_clear(&add);
secp256k1_scalar_clear(&gnb);
}
Expand Down
4 changes: 4 additions & 0 deletions src/group_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ static void secp256k1_ge_clear(secp256k1_ge *r) {
secp256k1_fe_clear(&r->y);
}

static void secp256k1_int_clear(int *r) {
*r = 0;
}

static int secp256k1_ge_set_xquad(secp256k1_ge *r, const secp256k1_fe *x) {
secp256k1_fe x2, x3, c;
r->x = *x;
Expand Down

0 comments on commit 178f16b

Please sign in to comment.