diff --git a/include/asterisk/threadstorage.h b/include/asterisk/threadstorage.h
index 09b6b78788e7975706c1828917f75217524b10d1..633c7e7c33019c60a69116153329583fa6294801 100644
--- a/include/asterisk/threadstorage.h
+++ b/include/asterisk/threadstorage.h
@@ -199,7 +199,7 @@ void *__ast_threadstorage_get(struct ast_threadstorage *ts, size_t init_size, co
 			return NULL;
 		}
 		pthread_setspecific(ts->key, buf);
-		__ast_threadstorage_object_add(ts->key, init_size, file, function, line);
+		__ast_threadstorage_object_add(&ts->key, init_size, file, function, line);
 	}
 
 	return buf;