Skip to content

Commit

Permalink
Fixed memory leak (Peter de Kraker)
Browse files Browse the repository at this point in the history
  • Loading branch information
xroche committed Jul 29, 2014
1 parent c5422b3 commit 81a610d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jni/coffeecatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,11 @@ static int coffeecatch_handler_cleanup() {
}
}

/* Initialize thread var. */
/* Free old structure. */
free(native_code_g.sa_old);
native_code_g.sa_old = NULL;

/* Delete thread var. */
if (pthread_key_delete(native_code_thread) != 0) {
assert(! "pthread_key_delete() failed");
}
Expand Down

0 comments on commit 81a610d

Please sign in to comment.