2006-12-13: fixed memleak on getdirentries()