Hi Paul, > It seems that your patch is incomplete, as there's a memory leak in the > unlikely case that the malloc call fails. Oops, indeed. Thanks for the review! > Something like the attached patch instead, perhaps? Hmm, this patch is freeing the same object through the variable 'dirname' on one branch and through the variable 'previous_dirname' on the other branch. A bit hard to understand, and thus likely to introduce more bugs in the future, I would say. I prefer the attached one. Pushed. Bruno