diff --git a/pandas/_libs/hashing.pyx b/pandas/_libs/hashing.pyx index a1fd70529efa7..280cbe024b36f 100644 --- a/pandas/_libs/hashing.pyx +++ b/pandas/_libs/hashing.pyx @@ -91,6 +91,8 @@ def hash_object_array( hash(val) data = str(val).encode(encoding) else: + free(vecs) + free(lens) raise TypeError( f"{val} of type {type(val)} is not a valid type for hashing, " "must be string or null"