From: <de...@us...> - 2012-02-24 11:08:43
|
Revision: 5980 http://gfarm.svn.sourceforge.net/gfarm/?rev=5980&view=rev Author: devtty Date: 2012-02-24 11:08:34 +0000 (Fri, 24 Feb 2012) Log Message: ----------- o Ticket #343: Fixed a memory leak issue. Thx for reporting, tbaba-san. Modified Paths: -------------- gfarm_v2/trunk/server/gfmd/host.c Modified: gfarm_v2/trunk/server/gfmd/host.c =================================================================== --- gfarm_v2/trunk/server/gfmd/host.c 2012-02-24 07:26:00 UTC (rev 5979) +++ gfarm_v2/trunk/server/gfmd/host.c 2012-02-24 11:08:34 UTC (rev 5980) @@ -769,6 +769,7 @@ return (NULL); abstract_host_init(&h->ah, &host_ops, "host_new"); h->hi = *hi; + h->fsngroupname = NULL; gfarm_mutex_init(&h->back_channel_mutex, diag, BACK_CHANNEL_DIAG); #ifdef COMPAT_GFARM_2_3 h->back_channel_result = NULL; @@ -1113,7 +1114,10 @@ if (h != NULL) { if (hi->fsngroupname != NULL) - h->fsngroupname = strdup(hi->fsngroupname); + /* + * Not strdup() but just change the ownership. + */ + h->fsngroupname = hi->fsngroupname; else h->fsngroupname = NULL; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |