Index: kernel/generic/src/ipc/ipc.c
===================================================================
--- kernel/generic/src/ipc/ipc.c	(revision 525e91b58b5dae8883ac0f7a20f38257c0d5c87b)
+++ kernel/generic/src/ipc/ipc.c	(revision f9bd2e3e073db3093492a744250c4efaab427fd4)
@@ -637,12 +637,18 @@
 
 		/*
-		 * Just for sure, we might have had some IPC_PHONE_CONNECTING
-		 * phones
+		 * We might have had some IPC_PHONE_CONNECTING phones at the
+		 * beginning of ipc_cleanup(). Depending on whether these were
+		 * forgotten or answered, they will eventually enter the
+		 * IPC_PHONE_FREE or IPC_PHONE_CONNECTED states, respectively.
+		 * In the latter case, the other side may slam the open phones
+		 * at any time, in which case we will get an IPC_PHONE_SLAMMED
+		 * phone.
 		 */
-		if (TASK->phones[i].state == IPC_PHONE_CONNECTED) {
+		if ((TASK->phones[i].state == IPC_PHONE_CONNECTED) ||
+		    (TASK->phones[i].state == IPC_PHONE_SLAMMED)) {
 			ipc_phone_hangup(&TASK->phones[i]);
 			/*
-			 * Now there is one extra active call, which needs to be
-			 * forgotten.
+			 * Now there may be one extra active call, which needs
+			 * to be forgotten.
 			 */
 			ipc_forget_all_active_calls();
