Re: [gtk-list] CList text corruption when executing callback...



>    if (event->type == GDK_2BUTTON_PRESS)
>    {
>       gtk_clist_get_text (GTK_CLIST(rpmCList), row, col, &Name);
>       NameCopy = strdup (Name);
>       free (Name);

By freeing Name you are freeing clist's text string -- that's bad.  All
clist's _get_ calls return pointers to the data the clist uses and
manages.  If you free Name then clist will be trying to use freeded
memory.





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