Skip to content

Commit b9877b3

Browse files
committed
fix: Add missing memunlock of local variable when it goes out of scope.
Issue found by PVS Studio. It also found another one, but that's a false positive.
1 parent dab5fe4 commit b9877b3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

toxcore/group_chats.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4033,6 +4033,7 @@ static int handle_gc_key_exchange(const GC_Chat *chat, GC_Connection *gconn, con
40334033
// we're doing it anyway for symmetry with the memzero+munlock below, where we
40344034
// really do care about it.
40354035
crypto_memzero(new_session_sk, sizeof(new_session_sk));
4036+
crypto_memunlock(new_session_sk, sizeof(new_session_sk));
40364037
return -3;
40374038
}
40384039

0 commit comments

Comments
 (0)