Currently PetscFunctionListAdd() maintains a list of all function lists in existence and in PetscFinalize() PetscFunctionListDestroyAll() loops over all the list of lists destroying each list. Thus all of these lists are destroyed without the XXXRegisterDestroy() needing to be called. A drawback is that PetscFunctionListDestroyAll() is called before some of the XXXFinalizePackage() are called thus leaving XXXList global variables pointing to freed memory (this is why for example VecFinalizePackage() has VecList = NULL; in it.)
I propose the following change; each appropriate XXXFinalizePackage() call the appropriate XXXRegisterDestroy() (this would replace the VecList = NULL; lines) and PetscFunctionListDestroyAll() be renamed to just generate a dump of any lists that don't get properly freed.