--- asterisk-11.3.0/main/astobj2.c.orig 2013-05-13 23:27:37.000000000 -0500 +++ asterisk-11.3.0/main/astobj2.c 2013-05-13 23:38:53.000000000 -0500 @@ -518,6 +518,7 @@ if (obj == NULL) return -1; +#ifdef REF_DEBUG if (delta != 0) { FILE *refo = fopen(REF_FILE, "a"); if (refo) { @@ -533,6 +534,7 @@ fclose(refo); } } +#endif return internal_ao2_ref(user_data, delta, file, line, func); }