From 056e38c58720c6aab65db997ebc2b669d2465f12 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 21 Jun 2006 22:38:58 +0000 Subject: [PATCH] fix a mem leak git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1224 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-core/avahi-test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/avahi-core/avahi-test.c b/avahi-core/avahi-test.c index f540cf4..061eec1 100644 --- a/avahi-core/avahi-test.c +++ b/avahi-core/avahi-test.c @@ -192,9 +192,11 @@ static void create_entries(int new_name) { r->data.cname.name = avahi_strdup("cocaine.local"); if (avahi_server_add(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, r) < 0) { + avahi_record_unref(r); avahi_log_error("Failed to add CNAME record"); goto fail; } + avahi_record_unref(r); avahi_s_entry_group_commit(group); return; -- 2.39.5