Comment 10 for bug 177072

Revision history for this message
Sebastian Keller (skeller) wrote :

Yes, I just tested it seems it was the patch that was dropped by mistake. It works now.

However I'm still not sure if this patch has a small memory leak, because everytime the function is called, memory for dirname is allocated. This is never freed, because in the original function it would only be allocated once, because it is meant to be static. By removing the "if (dirname == NULL)" check it gets allocated in every call of the function. It does not seem to be neccessary to remove this check, as the function itself is not static. So adding the check back would close the leak - however it might be better to hear the patch authors opinion on that.