Commit 5b94e27
committed
Fix some inconsistencies with memory freeing in pg_createsubscriber
The correct function documented to free the memory allocated for the
result returned by PQescapeIdentifier() and PQescapeLiteral() is
PQfreemem(). pg_createsubscriber.c relied on pg_free() instead, which
is not incorrect as both do a free() internally, but inconsistent with
the documentation.
While on it, this commit fixes a small memory leak introduced by
4867f8a, as the code of pg_createsubscriber makes this effort.
Author: Ranier Vilela
Reviewed-by: Euler Taveira
Discussion: https://postgr.es/m/CAEudQAp=AW5dJXrGLbC_aZg_9nOo=42W7uLDRONFQE-gcgnkgQ@mail.gmail.com
Backpatch-through: 171 parent 1b5841d commit 5b94e27
1 file changed
+13
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1130 | 1130 | | |
1131 | 1131 | | |
1132 | 1132 | | |
| 1133 | + | |
1133 | 1134 | | |
1134 | 1135 | | |
1135 | 1136 | | |
| |||
1329 | 1330 | | |
1330 | 1331 | | |
1331 | 1332 | | |
1332 | | - | |
| 1333 | + | |
1333 | 1334 | | |
1334 | 1335 | | |
1335 | 1336 | | |
| |||
1375 | 1376 | | |
1376 | 1377 | | |
1377 | 1378 | | |
1378 | | - | |
| 1379 | + | |
1379 | 1380 | | |
1380 | 1381 | | |
1381 | 1382 | | |
| |||
1614 | 1615 | | |
1615 | 1616 | | |
1616 | 1617 | | |
1617 | | - | |
1618 | | - | |
| 1618 | + | |
| 1619 | + | |
1619 | 1620 | | |
1620 | 1621 | | |
1621 | 1622 | | |
| |||
1638 | 1639 | | |
1639 | 1640 | | |
1640 | 1641 | | |
1641 | | - | |
| 1642 | + | |
1642 | 1643 | | |
1643 | 1644 | | |
1644 | 1645 | | |
| |||
1702 | 1703 | | |
1703 | 1704 | | |
1704 | 1705 | | |
1705 | | - | |
1706 | | - | |
1707 | | - | |
1708 | | - | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
1709 | 1710 | | |
1710 | 1711 | | |
1711 | 1712 | | |
| |||
1812 | 1813 | | |
1813 | 1814 | | |
1814 | 1815 | | |
1815 | | - | |
1816 | | - | |
| 1816 | + | |
| 1817 | + | |
1817 | 1818 | | |
1818 | 1819 | | |
1819 | 1820 | | |
| |||
1856 | 1857 | | |
1857 | 1858 | | |
1858 | 1859 | | |
1859 | | - | |
| 1860 | + | |
1860 | 1861 | | |
1861 | 1862 | | |
1862 | 1863 | | |
| |||
0 commit comments