Skip to content

Commit 80b2d06

Browse files
committed
sign: use wc_ForceZero in cleanup
F/2273
1 parent 5cb0cb5 commit 80b2d06

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

tools/keytools/sign.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -317,18 +317,11 @@ static uint32_t header_append_limit(void)
317317

318318
static void zero_and_free(uint8_t *buf, uint32_t len)
319319
{
320-
volatile uint8_t *p;
321-
uint32_t i;
322-
323320
if (buf == NULL) {
324321
return;
325322
}
326323

327-
p = buf;
328-
for (i = 0; i < len; i++) {
329-
p[i] = 0;
330-
}
331-
324+
wc_ForceZero(buf, len);
332325
free(buf);
333326
}
334327

0 commit comments

Comments
 (0)