]> git.meshlink.io Git - catta/commitdiff
fix a mem leak
authorLennart Poettering <lennart@poettering.net>
Wed, 21 Jun 2006 22:38:58 +0000 (22:38 +0000)
committerLennart Poettering <lennart@poettering.net>
Wed, 21 Jun 2006 22:38:58 +0000 (22:38 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1224 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/avahi-test.c

index f540cf4bffe494ce6b35884370bbdce3c4da3937..061eec159f17426b2e8645c15dbcc6e294072866 100644 (file)
@@ -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;