Message ID | 20240227193521.304643-2-prestwoj@gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
Series | [1/2] unit: fix memory leak in test-dpp | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
prestwoj/iwd-ci-gitlint | success | GitLint |
diff --git a/src/crypto.c b/src/crypto.c index 3128b2a5..7235e3c2 100644 --- a/src/crypto.c +++ b/src/crypto.c @@ -331,7 +331,7 @@ bool aes_siv_encrypt(const void *key, size_t key_len, const void *in, struct iovec iov[num_ad + 1]; uint8_t v[16]; - if (ad) + if (ad && num_ad) memcpy(iov, ad, sizeof(struct iovec) * num_ad); iov[num_ad].iov_base = (void *)in;