Skip to content

Commit

Permalink
aes: fix memory leak
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo de Lara <[email protected]>
  • Loading branch information
pablodelara authored and mdcornu committed Apr 16, 2024
1 parent 019efb8 commit f06ea6b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions aes/cbc_std_vectors_random_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,10 @@ test_std_combinations(void)
struct cbc_vector vect = cbc_vectors[i];

ret = posix_memalign((void **) &vect.KEYS, 16, (sizeof(*vect.KEYS)));
if ((0 != ret) || (NULL == vect.KEYS))
return 1;
if ((0 != ret) || (NULL == vect.KEYS)) {
ret = 1;
break;
}
// IV data must be aligned to 16 byte boundary so move data in aligned buffer and
// change out the pointer
memcpy(iv, vect.IV, CBC_IV_DATA_LEN);
Expand Down

0 comments on commit f06ea6b

Please sign in to comment.