Skip to contentSkip to conversation

Do not use g_list_free_full

PATCH Superseded Jonathan Rajotte 1 participant 1 message Jan 4, 2016 1 message not in the archive

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH v2 1/1 Do not use g_list_free_full

v2: commit message: 2.20-> 2.28, glibc -> glib

--

Babeltrace support glib all the way back to 2.28 and g_list_free_full exists from 2.28.0 (backported to 2.27.2) only.

The replacement is the current implementation found in modern glib.

---
 formats/ctf/ir/visitor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
formats/ctf/ir/visitor.c +2 -1
index 9b65ed5..704a804 100644
@@ -724,7 +724,8 @@ end:
 		g_free(name_copy);
 	}
 	if (path_tokens) {
-		g_list_free_full(path_tokens, free);
+		g_list_foreach(path_tokens, (GFunc) free, NULL);
+		g_list_free(path_tokens);
 	}
 	return ret;
 error:
Signature · 1 line
2.5.0