Merge "BuildSystem: Really do not pass unknown-warning options to the compiler."
[asterisk/asterisk.git] / funcs / func_pjsip_aor.c
index 41c15ff..799e9e4 100644 (file)
@@ -34,8 +34,6 @@
 
 #include "asterisk.h"
 
-ASTERISK_REGISTER_FILE()
-
 #include <pjsip.h>
 #include <pjlib.h>
 
@@ -135,6 +133,8 @@ static int pjsip_aor_function_read(struct ast_channel *chan,
 
                        ast_str_append(buf, len, "%s", ast_sorcery_object_get_id(contact));
                        first = 0;
+
+                       ao2_ref(contact, -1);
                }
                ao2_iterator_destroy(&i);
        } else {