Tue Jun 1 08:19:07 PDT 2010
- Previous message: [Slony1-commit] slony1-engine/src/slon cleanup_thread.c remote_listen.c remote_worker.c
- Next message: [Slony1-commit] slony1-engine RELEASE
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/src/slon In directory main.slony.info:/tmp/cvs-serv26579/src/slon Modified Files: Tag: REL_1_2_STABLE remote_listen.c remote_worker.c Log Message: Memory leak fixes submittedb by Ulrich Weber http://lists.slony.info/pipermail/slony1-hackers/2010-April/000321.html Index: remote_worker.c =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_worker.c,v retrieving revision 1.124.2.44 retrieving revision 1.124.2.45 diff -C 2 -d -r1.124.2.44 -r1.124.2.45 *** remote_worker.c 30 Apr 2010 23:20:59 -0000 1.124.2.44 --- remote_worker.c 1 Jun 2010 15:19:05 -0000 1.124.2.45 *************** *** 285,289 **** SlonDString query1; SlonDString query2; - SlonDString lsquery; SlonWorkMsg *msg; SlonWorkMsg_event *event; --- 285,288 ---- *************** *** 320,324 **** dstring_init(&query1); dstring_init(&query2); - dstring_init(&lsquery); /* --- 319,322 ---- *************** *** 1385,1388 **** --- 1383,1387 ---- rstat = PQresultStatus(res); slon_log(SLON_ERROR, "DDL Statement failed - %s\n", PQresStatus(rstat)); + PQclear(res); dstring_free(&query1); slon_retry(); *************** *** 1390,1393 **** --- 1389,1393 ---- rstat = PQresultStatus(res); slon_log (SLON_CONFIG, "DDL success - %s\n", PQresStatus(rstat)); + PQclear(res); } slon_log(SLON_INFO, "completed DDL script - run ddlScript_complete_int()\n"); *************** *** 4917,4920 **** --- 4917,4921 ---- { dstring_free(&query); + dstring_free(&query2); pthread_mutex_unlock(&(provider->helper_lock)); pthread_exit(NULL); Index: remote_listen.c =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_listen.c,v retrieving revision 1.31.2.7 retrieving revision 1.31.2.8 diff -C 2 -d -r1.31.2.7 -r1.31.2.8 *** remote_listen.c 31 Mar 2010 13:22:20 -0000 1.31.2.7 --- remote_listen.c 1 Jun 2010 15:19:05 -0000 1.31.2.8 *************** *** 451,454 **** --- 451,455 ---- "remoteListenThread_%d: thread done\n", node->no_id); + dstring_free(&query1); pthread_exit(NULL); } *************** *** 663,666 **** --- 664,668 ---- char seqno_buf[64]; PGresult *res; + PGnotify *notification; int ntuples; int tupno; *************** *** 822,825 **** --- 824,831 ---- PQclear(res); + /* Remove notifications from memory */ + while ((notification = PQnotifies(conn->dbconn)) != NULL) + PQfreemem(notification); + return 0; }
- Previous message: [Slony1-commit] slony1-engine/src/slon cleanup_thread.c remote_listen.c remote_worker.c
- Next message: [Slony1-commit] slony1-engine RELEASE
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list