diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index e8d9e4550ced415f6a9c38f6b32d405703f83f04..99f914f44799b0dcc7c60c8ab3d1fdf9291f9c08 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -5676,7 +5676,7 @@ static int sip_hangup(struct ast_channel *ast)
 				}
 			} else {	/* Incoming call, not up */
 				const char *res;
-				AST_SCHED_DEL(sched, p->provisional_keepalive_sched_id);
+				AST_SCHED_DEL_UNREF(sched, p->provisional_keepalive_sched_id, dialog_unref(p, "when you delete the provisional_keepalive_sched_id, you should dec the refcount for the stored dialog ptr"));
 				if (p->hangupcause && (res = hangup_cause2sip(p->hangupcause)))
 					transmit_response_reliable(p, res, &p->initreq);
 				else