What do you suppose is right? Because what is there doesn't look right either.
Perhaps, but I don't think the patch does a great job of explaining the issue.
In any case, note that the number of entries shouldn't change when an existing entry is marked as free in ddraw_free_handle(); the entry doesn't go away, only its type is changed to DDRAW_HANDLE_FREE. Similarly, reusing an existing entry from the free list doesn't change the total number of allocated entries.