diff --git a/main/threadstorage.c b/main/threadstorage.c
index 01bab356ba37d52535238bb4d627e7258800ab57..a03f3c98b26a979943629318eb5d6ffa654e8e0b 100644
--- a/main/threadstorage.c
+++ b/main/threadstorage.c
@@ -78,7 +78,7 @@ void __ast_threadstorage_object_remove(void *key)
 	AST_RWLIST_WRLOCK(&tls_objects);
 	AST_LIST_TRAVERSE_SAFE_BEGIN(&tls_objects, to, entry) {
 		if (to->key == key) {
-			AST_LIST_REMOVE_CURRENT(&tls_objects, entry);
+			AST_LIST_REMOVE_CURRENT(entry);
 			break;
 		}
 	}