Tom Lane
ee58de1008
Fix memory leak in XMLSERIALIZE(... INDENT).
...
xmltotext_with_options sometimes tries to replace the existing
root node of a libxml2 document. In that case xmlDocSetRootElement
will unlink and return the old root node; if we fail to free it,
it's leaked for the remainder of the session. The amount of memory
at stake is not large, a couple hundred bytes per occurrence, but
that could still become annoying in heavy usage.
Our only other xmlDocSetRootElement call is not at risk because
it's working on a just-created document, but let's modify that
code too to make it clear that it's dependent on that.
Author: Tom Lane <tgl@sss.pgh.pa.us >
Reviewed-by: Jim Jones <jim.jones@uni-muenster.de >
Discussion: https://postgr.es/m/1358967.1747858817@sss.pgh.pa.us
Backpatch-through: 16
2025-05-22 13:52:46 -04:00
..
2022-09-04 12:09:01 +07:00
2023-07-07 11:25:23 -07:00
2023-03-25 22:49:33 +01:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-02-06 09:41:01 +01:00
2023-05-04 11:48:23 -04:00
2025-03-13 16:07:55 -04:00
2023-01-02 15:00:37 -05:00
2023-11-06 10:56:43 -05:00
2023-01-10 05:54:36 +01:00
2023-01-02 15:00:37 -05:00
2024-07-19 11:52:32 -05:00
2023-01-10 05:54:36 +01:00
2023-01-10 05:54:36 +01:00
2023-10-20 13:40:15 -04:00
2024-05-22 18:22:51 -04:00
2023-10-14 16:33:54 -07:00
2024-07-28 22:23:54 +12:00
2023-01-02 15:00:37 -05:00
2023-06-08 11:24:31 -04:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-05-19 17:24:48 -04:00
2023-01-02 15:00:37 -05:00
2024-12-07 13:12:32 -05:00
2023-03-16 12:04:08 -04:00
2023-01-10 05:54:36 +01:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2025-01-12 23:44:39 +01:00
2019-08-18 19:27:23 -04:00
2019-08-18 19:27:23 -04:00
2024-05-01 16:35:05 +12:00
2023-01-15 17:32:09 -05:00
2024-09-11 13:22:30 +02:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-08-16 16:18:49 +02:00
2023-03-29 12:11:36 +02:00
2023-01-02 15:00:37 -05:00
2023-05-19 17:24:48 -04:00
2024-03-11 03:06:55 +02:00
2023-04-08 22:10:39 +12:00
2023-05-19 17:24:48 -04:00
2023-07-10 10:46:54 +02:00
2023-08-02 01:40:27 +12:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-02-23 11:17:41 -08:00
2023-01-10 08:53:47 +05:30
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2022-09-04 12:09:01 +07:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-02-28 08:04:13 +09:00
2023-04-24 11:16:17 +02:00
2023-01-02 15:00:37 -05:00
2023-06-26 11:52:31 +03:00
2023-01-10 05:54:36 +01:00
2023-01-02 15:00:37 -05:00
2023-01-10 05:54:36 +01:00
2023-03-16 14:48:45 -07:00
2024-07-08 17:52:52 +01:00
2023-08-02 12:06:08 +12:00
2023-01-15 17:32:09 -05:00
2023-03-01 11:30:31 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2024-10-05 14:01:24 +13:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2024-09-06 11:58:15 -04:00
2023-01-02 15:00:37 -05:00
2023-01-10 05:54:36 +01:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-02 15:00:37 -05:00
2023-01-10 05:54:36 +01:00
2023-10-31 09:10:35 -04:00
2023-04-08 22:10:39 +12:00
2023-01-02 15:00:37 -05:00
2023-05-04 19:55:56 +02:00
2023-01-02 15:00:37 -05:00
2025-05-19 18:50:50 +03:00
2025-01-02 18:02:02 +09:00
2023-02-13 09:57:15 +01:00
2024-04-28 13:42:13 -04:00
2023-01-02 15:00:37 -05:00
2023-01-10 05:54:36 +01:00
2023-09-04 14:55:49 +09:00
2023-02-07 06:57:59 +01:00
2023-02-07 06:57:59 +01:00
2023-05-19 17:24:48 -04:00
2023-01-02 15:00:37 -05:00
2023-02-07 06:57:59 +01:00
2025-05-11 09:47:10 -04:00
2023-02-07 06:57:59 +01:00
2023-05-19 17:24:48 -04:00
2023-01-02 15:00:37 -05:00
2025-04-02 16:17:58 -04:00
2023-02-14 13:32:19 +01:00
2023-02-14 13:32:19 +01:00
2024-07-30 16:25:21 -07:00
2023-06-26 11:52:31 +03:00
2023-01-02 15:00:37 -05:00
2024-05-01 16:35:05 +12:00
2024-02-09 12:37:21 +02:00
2023-01-02 15:00:37 -05:00
2025-05-22 13:52:46 -04:00