Commit 64ca85ce authored by Simon McVittie's avatar Simon McVittie

g_hmac_copy: initialize the refcount

In practice, the uninitialized refcount will typically mean that the copy is
never freed, and leaks.
Signed-off-by: Simon McVittie's avatarSimon McVittie <>
Bug: default avatarEmmanuele Bassi <>
parent edfab83c
......@@ -174,6 +174,7 @@ g_hmac_copy (const GHmac *hmac)
g_return_val_if_fail (hmac != NULL, NULL);
copy = g_slice_new (GHmac);
copy->ref_count = 1;
copy->digest_type = hmac->digest_type;
copy->digesti = g_checksum_copy (hmac->digesti);
copy->digesto = g_checksum_copy (hmac->digesto);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment