[Geany-Devel] [geany/geany-plugins] 4cc119: Scope: Fix mismatched allocator/deallocator
lists.ban at xxxxx
Thu Mar 7 20:06:51 UTC 2013
Le 07/03/2013 20:37, Matthew Brush a écrit :
> On 13-03-07 11:06 AM, Dimitar Zhekov wrote:
>> On Mon, 04 Mar 2013 22:30:40 -0000
>> Colomban Wendling <git-noreply at geany.org> wrote:
>>> Log Message:
>>> Scope: Fix mismatched allocator/deallocator
>> These are not mismatched, I'm using strdup() instead of strdup() for
>> strings that must never be NULL. Unless we have a policy to always
>> use g_strdup(), or there is a real g_/strdup vs. g_/free mismatch
>> somewhere, I'm going to revert them.
> I don't see any mismatch either but strdup() is not in C standard (at
> least C89/99) but rather POSIX or some other one AFAIK.
For example, an obvious mismatch is
foo ? utils_get_locale_from_utf8(start) : strdup(start)
utils_get_locale_from_utf8() allocates with glib, strdup() with libc.
More information about the Devel