1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-25 12:15:32 +03:00
aports/community/gvm-libs/malloc-trim.patch
Francesco Colista 6beec712ce community/gvm-libs: upgrade to 10.0.0
Renamed from openvas-libraries, removed unused patch
2019-04-06 17:19:56 +00:00

24 lines
540 B
Diff

diff --git a/base/hosts.c b/base/hosts.c
index 74f5d92..1073e2c 100644
--- a/base/hosts.c
+++ b/base/hosts.c
@@ -1013,7 +1013,9 @@ gvm_hosts_deduplicate (gvm_hosts_t *hosts)
hosts->count -= duplicates;
hosts->removed += duplicates;
hosts->current = 0;
+#ifdef __GLIBC__
malloc_trim (0);
+#endif
}
/**
@@ -1208,7 +1210,9 @@ gvm_hosts_new_with_max (const gchar *hosts_str, unsigned int max_hosts)
gvm_hosts_deduplicate (hosts);
g_strfreev (split);
+#ifdef __GLIBC__
malloc_trim (0);
+#endif
return hosts;
}