diff --git a/lib/neardal_record.c b/lib/neardal_record.c
index 669012c..cfed5e8 100644
--- a/lib/neardal_record.c
+++ b/lib/neardal_record.c
@@ -31,7 +31,6 @@ void neardal_record_free(neardal_record *r)
 {
 	g_return_if_fail(r);
 	neardal_g_strfreev((void **) r, &r->uriObjSize);
-	memset(r, 0, sizeof(*r));
 }
 
 void neardal_free_record(neardal_record *record) \
diff --git a/lib/neardal_tools.c b/lib/neardal_tools.c
index f0d6157..f307df6 100644
--- a/lib/neardal_tools.c
+++ b/lib/neardal_tools.c
@@ -32,9 +32,12 @@
 void neardal_g_strfreev(void **array, void *end)
 {
 	void **p = array;
-	for (; (void *) p < end; p++)
+	for (; (void *) p < end; p++) {
 		g_free(*p);
+		*p = NULL;
+	}
 	g_free(array);
+	array = NULL;
 }
 
 void neardal_g_variant_add_parsed(GVariant **v, const char *format, ...)