[Monetdb-developers] [Monetdb-sql-checkins] sql/src/storage/bpm bpm_distribution.mx, , 1.1, 1.2

Romulo Goncalves R.A.Goncalves at cwi.nl
Tue Jul 22 09:58:07 CEST 2008


Stefan Manegold wrote:
> 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 ...
The _DELETE functions is used when a bpmHost is destroyed.
Does it free the memory?

Romulo
> 
> 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
>> Monetdb-sql-checkins at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins
>>
>>
>>
>>
>>
>>
> 





More information about the developers-list mailing list