I believe that technically, the public API hasn't been changed. The API
doesn't specify whether the returned pointer should be free()d, and is
broken by sometimes returning a pointer that needs to be free()d and
sometimes one that mustn't, so one must never free() the pointer. Some
distributions decided to fix that by making th_get_pathname() always
return a free()able pointer, but portable programs can't rely on until
_all_ distributions do the same.

Using a static buffer of course makes the function non reentrant, but I
figured that's not typically a problem, and that therefore it would be
better if other distros chose the same solution, but if that won't
happen (I haven't even got around to bringing it up on the libtar
mailing list yet), I'll reconsider.

It's really unfortunate that there's no active upstream to set this
straight as well as fix the other API misdesigns and bugs.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.
https://bugs.launchpad.net/bugs/41804

Title:
  Major memory leak

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to