mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Fix libpq memory leak during PQreset() --- closePGconn() was not
freeing all transient state of the PGconn object.
This commit is contained in:
		@@ -8,7 +8,7 @@
 | 
				
			|||||||
 *
 | 
					 *
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * IDENTIFICATION
 | 
					 * IDENTIFICATION
 | 
				
			||||||
 *	  $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.213.2.3 2003/10/31 18:14:11 tgl Exp $
 | 
					 *	  $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.213.2.4 2005/07/13 15:26:25 tgl Exp $
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *-------------------------------------------------------------------------
 | 
					 *-------------------------------------------------------------------------
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@@ -1994,6 +1994,9 @@ closePGconn(PGconn *conn)
 | 
				
			|||||||
										 * absent */
 | 
															 * absent */
 | 
				
			||||||
	conn->asyncStatus = PGASYNC_IDLE;
 | 
						conn->asyncStatus = PGASYNC_IDLE;
 | 
				
			||||||
	pqClearAsyncResult(conn);	/* deallocate result and curTuple */
 | 
						pqClearAsyncResult(conn);	/* deallocate result and curTuple */
 | 
				
			||||||
 | 
						if (conn->notifyList)
 | 
				
			||||||
 | 
							DLFreeList(conn->notifyList);
 | 
				
			||||||
 | 
						conn->notifyList = NULL;
 | 
				
			||||||
	if (conn->lobjfuncs)
 | 
						if (conn->lobjfuncs)
 | 
				
			||||||
		free(conn->lobjfuncs);
 | 
							free(conn->lobjfuncs);
 | 
				
			||||||
	conn->lobjfuncs = NULL;
 | 
						conn->lobjfuncs = NULL;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user