Description: TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. . libxmlb (0.3.6-3) jammy; urgency=high . * Add fix for double-free from upstream (#127) Author: Sergio Costas Rodriguez --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: https://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: 2024-04-29 --- libxmlb-0.3.6.orig/src/xb-builder.c +++ libxmlb-0.3.6/src/xb-builder.c @@ -438,7 +438,7 @@ xb_builder_xml_lang_prio_cb (XbBuilderNo for (guint i = 0; i < nodes->len; i++) { XbBuilderNode *bn2 = g_ptr_array_index (nodes, i); if (xb_builder_node_get_priority (bn2) < prio_best) - g_ptr_array_add (nodes_to_destroy, bn2); + g_ptr_array_add (nodes_to_destroy, g_object_ref(bn2)); /* never visit this node again */ xb_builder_node_set_priority (bn2, -2); @@ -751,7 +751,7 @@ xb_builder_compile (XbBuilder *self, XbB XbBuilderNodetabHelper nodetab_helper = { .buf = NULL, }; - g_autoptr(GPtrArray) nodes_to_destroy = g_ptr_array_new (); + g_autoptr(GPtrArray) nodes_to_destroy = g_ptr_array_new_with_free_func ((GDestroyNotify)g_object_unref); g_autoptr(GTimer) timer = xb_silo_start_profile (priv->silo); g_autoptr(XbBuilderCompileHelper) helper = NULL;