In file: .../src/backend/postmaster/postmaster.c I found 3 leaks and
probably a bug. To find code added/modifyied, search "Fixed". Gianluca Puggelli
This commit is contained in:
parent
28a08fd4ac
commit
0681513693
@ -10,7 +10,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.28 1996/12/07 04:38:40 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.29 1996/12/26 17:49:05 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
*
|
*
|
||||||
@ -601,6 +601,7 @@ ServerLoop(void)
|
|||||||
StreamClose(port->sock);
|
StreamClose(port->sock);
|
||||||
next = DLGetSucc(curr);
|
next = DLGetSucc(curr);
|
||||||
DLRemove(curr);
|
DLRemove(curr);
|
||||||
|
free(port);
|
||||||
DLFreeElem(curr);
|
DLFreeElem(curr);
|
||||||
curr = next;
|
curr = next;
|
||||||
continue;
|
continue;
|
||||||
@ -857,6 +858,7 @@ CleanupProc(int pid,
|
|||||||
bp = (Backend*)DLE_VAL(curr);
|
bp = (Backend*)DLE_VAL(curr);
|
||||||
if (bp->pid == pid) {
|
if (bp->pid == pid) {
|
||||||
DLRemove(curr);
|
DLRemove(curr);
|
||||||
|
free(bp);
|
||||||
DLFreeElem(curr);
|
DLFreeElem(curr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -897,12 +899,13 @@ CleanupProc(int pid,
|
|||||||
|
|
||||||
prev = DLGetPred(curr);
|
prev = DLGetPred(curr);
|
||||||
DLRemove(curr);
|
DLRemove(curr);
|
||||||
|
free(bp);
|
||||||
DLFreeElem(curr);
|
DLFreeElem(curr);
|
||||||
if (!prev) { /* removed head */
|
if (!prev) { /* removed head */
|
||||||
curr = DLGetHead(BackendList);
|
curr = DLGetHead(BackendList);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
curr = DLGetSucc(curr);
|
curr = DLGetSucc(prev);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* -------------
|
* -------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user