On Monday 03 January 2005 2:17 pm, Chris Shoemaker wrote: > On Mon, Jan 03, 2005 at 12:14:31PM +0000, Neil Williams wrote: > > Lines 129+130 in qofbackend.c are confusing me: > > > > 129 if (be->error_msg) g_free (be->error_msg); > > 130 be->error_msg = NULL; > > > > I'm getting a segmentation fault because error_msg exists but is out of > > bounds. Why would it exist before g_new had finished? Why is it checked? > > Wouldn't any uninitialised value be out of range? > > g_new doesn't zero memory, g_new0 does.
Thanks. Sorted - I called be = g_new0( etc. and it's fine. -- Neil Williams ============= http://www.dclug.org.uk/ http://www.nosoftwarepatents.com/ http://sourceforge.net/projects/isbnsearch/ http://www.williamsleesmill.me.uk/ http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3
pgptZc60TwGST.pgp
Description: PGP signature
_______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
