With a few tests I have discovered that when quitting Blender the filelist in SpaceFile doesn't get free'd. storage.c: I have replaced strdup for the relname member in BLI_builddir with BLI_strdup. and malloc with MEM_mallocN for the string member in BLI_addstrings(). filesel.c: Of course also had to replace free with MEM_freeN in freefilelist(). In freespacelist (space.c) I added call to freefilelist for the SPACE_FILE space type.