diff --git a/main/pbx.c b/main/pbx.c
index a1ed1b52d687befef378f228af8c1521a25ad79a..0e0c6f366a351b4989d90db5534202145165f91f 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -4820,7 +4820,7 @@ static int handle_presencechange(void *datap)
 	res = 0;
 
 presencechange_cleanup:
-	ast_free(hint_app);
+	ast_ref(hint_app, -1);
 	ao2_ref(pc, -1);
 
 	return res;