Re: gtk_entry_get_text + strange Segmentation fault
- From: Havoc Pennington <hp redhat com>
- To: Marc Bruenink <marc bruenink de>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gtk_entry_get_text + strange Segmentation fault
- Date: 05 Dec 2001 17:47:09 -0500
Marc Bruenink <marc bruenink de> writes:
char *cBuffer;
cBuffer = (char *)malloc(sizeof(unsigned int)*8+1);
...
cBuffer = gtk_entry_get_text(GTK_ENTRY(input));
...
free(cBuffer);
Rewrite it like this:
const char *cBuffer;
cBuffer = gtk_entry_get_text (GTK_ENTRY (input));
so no malloc or free.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]