On Mon, Jul 21, 2008 at 04:08:53PM +0000, Romulo Goncalves wrote: > Update of /cvsroot/monetdb/sql/src/storage/bpm > In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12270 > > Modified Files: > bpm_distribution.mx > Log Message: > Use strdup to avoid problems with garbage on the string. >
I suppose you do take care of the "garbage" that strdup() creates, i.e., free() the malloc()'ed memory once it is not used any more ... Stefan > > U bpm_distribution.mx > Index: bpm_distribution.mx > =================================================================== > RCS file: /cvsroot/monetdb/sql/src/storage/bpm/bpm_distribution.mx,v > retrieving revision 1.1 > retrieving revision 1.2 > diff -u -d -r1.1 -r1.2 > --- bpm_distribution.mx 19 Jan 2008 17:10:34 -0000 1.1 > +++ bpm_distribution.mx 21 Jul 2008 16:08:50 -0000 1.2 > @@ -90,11 +90,11 @@ > bpmHost bpmH = NULL; > bpmH = ZNEW(bpmHostRec); > bpmH->id = id; > - bpmH->host = host; > + bpmH->host = strdup(host); > bpmH->port = port; > - bpmH->dbname = dbname; > - bpmH->user = user; > - bpmH->passwd = password; > + bpmH->dbname = strdup(dbname); > + bpmH->user = strdup(user); > + bpmH->passwd = strdup(password); > bpmH->next = hostAnchor; > hostAnchor = bpmH; > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Monetdb-sql-checkins mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins > > > > > > -- | Dr. Stefan Manegold | mailto:[EMAIL PROTECTED] | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4312 | ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Monetdb-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/monetdb-developers
