We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ca96ae commit 4ebda34Copy full SHA for 4ebda34
hash.c
@@ -131,6 +131,11 @@ lappend_uint64(List *list, uint64 datum)
131
return list;
132
}
133
134
+/*
135
+ * Remove element from a list and free the memory which was allocated to it.
136
+ * Looks unconventional, but we unconventionally allocate memory on append, so
137
+ * it maybe ok.
138
+ */
139
List *
140
ldelete_uint64(List *list, uint64 datum)
141
{
@@ -140,6 +145,7 @@ ldelete_uint64(List *list, uint64 datum)
145
146
if (*((uint64 *)lfirst(cell)) == datum)
142
147
148
+ pfree(lfirst(cell));
143
149
list = list_delete_ptr(list, lfirst(cell));
144
150
151
0 commit comments