bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

any idea what might be wrong with this code?...


From: Bryan Christ
Subject: any idea what might be wrong with this code?...
Date: Tue, 10 Jul 2007 15:29:05 -0500
User-agent: Thunderbird 2.0.0.4 (X11/20070615)

items=menu_items(menu);
if(items==NULL) return;

count=item_count(menu);
if(count==ERR || count==0) return;

if(free_menu(menu)==E_OK)
{
        for(i=0;i<count;i++)
        {
                text=(gchar*)item_name(items[i]);
                if(text!=NULL) g_free(text);      /* misbehaving line */
                free_item(items[i])               /* also misbehaving */
        }
}

just to mention up front, all of the names and descriptions associated with the ITEM were allocated with g_strdup()

according to strace() i am trying to free an invalid pointer.

anyone?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]