Chris Browne cbbrowne at lists.slony.info
Thu Feb 11 11:32:45 PST 2010
Update of /home/cvsd/slony1/slony1-engine/src/slon
In directory main.slony.info:/tmp/cvs-serv15838

Modified Files:
      Tag: REL_2_0_STABLE
	remote_worker.c 
Log Message:
Memory leak in remote worker, as found by Ulrich Weber

http://lists.slony.info/pipermail/slony1-hackers/2010-January/000292.html

Note that in 2.0, code has changed so that only some of the changes are
applicable


Index: remote_worker.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_worker.c,v
retrieving revision 1.176.2.7
retrieving revision 1.176.2.8
diff -C 2 -d -r1.176.2.7 -r1.176.2.8
*** remote_worker.c	9 Dec 2009 20:50:07 -0000	1.176.2.7
--- remote_worker.c	11 Feb 2010 19:32:42 -0000	1.176.2.8
***************
*** 1435,1438 ****
--- 1435,1439 ----
  						rstat = PQresultStatus(res);
  						slon_log(SLON_CONFIG, "DDL success - %s\n", PQresStatus(rstat));
+ 						PQclear(res);
  					}
  
***************
*** 4544,4547 ****
--- 4545,4549 ----
  		{
  			dstring_free(&query);
+ 			dstring_free(&query2);
  			pthread_mutex_unlock(&(provider->helper_lock));
  			pthread_exit(NULL);
***************
*** 4951,4954 ****
--- 4953,4957 ----
  						log_cmddata = PQgetvalue(res2, 0, 0);
  						largemem = log_cmdsize;
+ 						PQclear(res2);
  					}
  
***************
*** 5035,5039 ****
  					if (largemem > 0)
  					{
- 						PQclear(res2);
  						pthread_mutex_lock(&(wd->workdata_lock));
  						wd->workdata_largemem += largemem;
--- 5038,5041 ----



More information about the Slony1-commit mailing list