Index: kernel/generic/src/ipc/ops/clnestab.c
===================================================================
--- kernel/generic/src/ipc/ops/clnestab.c	(revision 13dbaa8c10f7b449dfe6e0d387ea4a6ee1c07984)
+++ kernel/generic/src/ipc/ops/clnestab.c	(revision 53af6e8cd34bdc25ee8f5917384f7f9ee1112038)
@@ -45,7 +45,20 @@
 }
 
+static void answer_cleanup(call_t *answer, ipc_data_t *olddata)
+{
+	phone_t *phone = (phone_t *) IPC_GET_ARG5(*olddata);
+
+	mutex_lock(&phone->lock);
+	if (phone->state == IPC_PHONE_CONNECTED) {
+		irq_spinlock_lock(&phone->callee->lock, true);
+		list_remove(&phone->link);
+		phone->state = IPC_PHONE_SLAMMED;
+		irq_spinlock_unlock(&phone->callee->lock, true);
+	}
+	mutex_unlock(&phone->lock);
+}
+
 static int answer_preprocess(call_t *answer, ipc_data_t *olddata)
 {
-	phone_t *phone = (phone_t *) IPC_GET_ARG5(*olddata);
 
 	if (IPC_GET_RETVAL(answer->data) != EOK) {
@@ -55,12 +68,5 @@
 		 * connection without sending IPC_M_HUNGUP back.
 		 */
-		mutex_lock(&phone->lock);
-		if (phone->state == IPC_PHONE_CONNECTED) {
-			irq_spinlock_lock(&phone->callee->lock, true);
-			list_remove(&phone->link);
-			phone->state = IPC_PHONE_SLAMMED;
-			irq_spinlock_unlock(&phone->callee->lock, true);
-		}
-		mutex_unlock(&phone->lock);
+		answer_cleanup(answer, olddata);
 	}
 	
@@ -70,5 +76,7 @@
 sysipc_ops_t ipc_m_clone_establish_ops = {
 	.request_preprocess = request_preprocess,
+	.request_forget = null_request_forget,
 	.request_process = null_request_process,
+	.answer_cleanup = answer_cleanup,
 	.answer_preprocess = answer_preprocess,
 	.answer_process = null_answer_process,
Index: kernel/generic/src/ipc/ops/conctmeto.c
===================================================================
--- kernel/generic/src/ipc/ops/conctmeto.c	(revision 13dbaa8c10f7b449dfe6e0d387ea4a6ee1c07984)
+++ kernel/generic/src/ipc/ops/conctmeto.c	(revision 53af6e8cd34bdc25ee8f5917384f7f9ee1112038)
@@ -54,4 +54,9 @@
 }
 
+static void request_forget(call_t *call)
+{
+	phone_dealloc(call->priv);
+}
+
 static int answer_preprocess(call_t *answer, ipc_data_t *olddata)
 {
@@ -77,5 +82,7 @@
 sysipc_ops_t ipc_m_connect_me_to_ops = {
 	.request_preprocess = request_preprocess,
+	.request_forget = request_forget,
 	.request_process = null_request_process,
+	.answer_cleanup = null_answer_cleanup,
 	.answer_preprocess = answer_preprocess,
 	.answer_process = answer_process,
Index: kernel/generic/src/ipc/ops/concttome.c
===================================================================
--- kernel/generic/src/ipc/ops/concttome.c	(revision 13dbaa8c10f7b449dfe6e0d387ea4a6ee1c07984)
+++ kernel/generic/src/ipc/ops/concttome.c	(revision 53af6e8cd34bdc25ee8f5917384f7f9ee1112038)
@@ -55,4 +55,11 @@
 }
 
+static void answer_cleanup(call_t *answer, ipc_data_t *olddata)
+{
+	int phoneid = (int) IPC_GET_ARG5(*olddata);
+
+	phone_dealloc(phoneid);
+}
+
 static int answer_preprocess(call_t *answer, ipc_data_t *olddata)
 {
@@ -61,7 +68,5 @@
 	if (IPC_GET_RETVAL(answer->data) != EOK) {
 		/* The connection was not accepted */
-		int phoneid = (int) IPC_GET_ARG5(*olddata);
-	
-		phone_dealloc(phoneid);
+		answer_cleanup(answer, olddata);
 	} else {
 		/* The connection was accepted */
@@ -77,5 +82,7 @@
 sysipc_ops_t ipc_m_connect_to_me_ops = {
 	.request_preprocess = null_request_preprocess,
+	.request_forget = null_request_forget,
 	.request_process = request_process,
+	.answer_cleanup = answer_cleanup,
 	.answer_preprocess = answer_preprocess,
 	.answer_process = null_answer_process,
Index: kernel/generic/src/ipc/ops/connclone.c
===================================================================
--- kernel/generic/src/ipc/ops/connclone.c	(revision 13dbaa8c10f7b449dfe6e0d387ea4a6ee1c07984)
+++ kernel/generic/src/ipc/ops/connclone.c	(revision 53af6e8cd34bdc25ee8f5917384f7f9ee1112038)
@@ -97,4 +97,25 @@
 }
 
+static void answer_cleanup(call_t *answer, ipc_data_t *olddata)
+{
+	int phoneid = (int) IPC_GET_ARG1(*olddata);
+	phone_t *phone = &TASK->phones[phoneid];
+
+	/*
+	 * In this case, the connection was established at the request
+	 * time and therefore we need to slam the phone.  We don't
+	 * merely hangup as that would result in sending IPC_M_HUNGUP
+	 * to the third party on the other side of the cloned phone.
+	 */
+	mutex_lock(&phone->lock);
+	if (phone->state == IPC_PHONE_CONNECTED) {
+		irq_spinlock_lock(&phone->callee->lock, true);
+		list_remove(&phone->link);
+		phone->state = IPC_PHONE_SLAMMED;
+		irq_spinlock_unlock(&phone->callee->lock, true);
+	}
+	mutex_unlock(&phone->lock);
+}
+
 static int answer_preprocess(call_t *answer, ipc_data_t *olddata)
 {
@@ -103,21 +124,5 @@
 		 * The recipient of the cloned phone rejected the offer.
 		 */
-		int phoneid = (int) IPC_GET_ARG1(*olddata);
-		phone_t *phone = &TASK->phones[phoneid];
-
-		/*
-		 * In this case, the connection was established at the request
-		 * time and therefore we need to slam the phone.  We don't
-		 * merely hangup as that would result in sending IPC_M_HUNGUP
-		 * to the third party on the other side of the cloned phone.
-		 */
-		mutex_lock(&phone->lock);
-		if (phone->state == IPC_PHONE_CONNECTED) {
-			irq_spinlock_lock(&phone->callee->lock, true);
-			list_remove(&phone->link);
-			phone->state = IPC_PHONE_SLAMMED;
-			irq_spinlock_unlock(&phone->callee->lock, true);
-		}
-		mutex_unlock(&phone->lock);
+		answer_cleanup(answer, olddata);
 	}
 
@@ -127,5 +132,7 @@
 sysipc_ops_t ipc_m_connection_clone_ops = {
 	.request_preprocess = request_preprocess,
+	.request_forget = null_request_forget,
 	.request_process = null_request_process,
+	.answer_cleanup = answer_cleanup,
 	.answer_preprocess = answer_preprocess,
 	.answer_process = null_answer_process,
Index: kernel/generic/src/ipc/ops/dataread.c
===================================================================
--- kernel/generic/src/ipc/ops/dataread.c	(revision 13dbaa8c10f7b449dfe6e0d387ea4a6ee1c07984)
+++ kernel/generic/src/ipc/ops/dataread.c	(revision 53af6e8cd34bdc25ee8f5917384f7f9ee1112038)
@@ -108,5 +108,7 @@
 sysipc_ops_t ipc_m_data_read_ops = {
 	.request_preprocess = request_preprocess,
+	.request_forget = null_request_forget,
 	.request_process = null_request_process,
+	.answer_cleanup = null_answer_cleanup,
 	.answer_preprocess = answer_preprocess,
 	.answer_process = answer_process,
Index: kernel/generic/src/ipc/ops/datawrite.c
===================================================================
--- kernel/generic/src/ipc/ops/datawrite.c	(revision 13dbaa8c10f7b449dfe6e0d387ea4a6ee1c07984)
+++ kernel/generic/src/ipc/ops/datawrite.c	(revision 53af6e8cd34bdc25ee8f5917384f7f9ee1112038)
@@ -84,6 +84,4 @@
 		}
 	}
-	free(answer->buffer);
-	answer->buffer = NULL;
 
 	return EOK;
@@ -93,5 +91,7 @@
 sysipc_ops_t ipc_m_data_write_ops = {
 	.request_preprocess = request_preprocess,
+	.request_forget = null_request_forget,
 	.request_process = null_request_process,
+	.answer_cleanup = null_answer_cleanup,
 	.answer_preprocess = answer_preprocess,
 	.answer_process = null_answer_process,
Index: kernel/generic/src/ipc/ops/debug.c
===================================================================
--- kernel/generic/src/ipc/ops/debug.c	(revision 13dbaa8c10f7b449dfe6e0d387ea4a6ee1c07984)
+++ kernel/generic/src/ipc/ops/debug.c	(revision 53af6e8cd34bdc25ee8f5917384f7f9ee1112038)
@@ -65,5 +65,7 @@
 	.request_preprocess = null_request_preprocess,
 #endif
+	.request_forget = null_request_forget,
 	.request_process = request_process,
+	.answer_cleanup = null_answer_cleanup,
 	.answer_preprocess = null_answer_preprocess,
 	.answer_process = answer_process,
Index: kernel/generic/src/ipc/ops/sharein.c
===================================================================
--- kernel/generic/src/ipc/ops/sharein.c	(revision 13dbaa8c10f7b449dfe6e0d387ea4a6ee1c07984)
+++ kernel/generic/src/ipc/ops/sharein.c	(revision 53af6e8cd34bdc25ee8f5917384f7f9ee1112038)
@@ -61,5 +61,7 @@
 sysipc_ops_t ipc_m_share_in_ops = {
 	.request_preprocess = null_request_preprocess,
+	.request_forget = null_request_forget,
 	.request_process = null_request_process,
+	.answer_cleanup = null_answer_cleanup,
 	.answer_preprocess = answer_preprocess,
 	.answer_process = null_answer_process,
Index: kernel/generic/src/ipc/ops/shareout.c
===================================================================
--- kernel/generic/src/ipc/ops/shareout.c	(revision 13dbaa8c10f7b449dfe6e0d387ea4a6ee1c07984)
+++ kernel/generic/src/ipc/ops/shareout.c	(revision 53af6e8cd34bdc25ee8f5917384f7f9ee1112038)
@@ -82,5 +82,7 @@
 sysipc_ops_t ipc_m_share_out_ops = {
 	.request_preprocess = request_preprocess,
+	.request_forget = null_request_forget,
 	.request_process = null_request_process,
+	.answer_cleanup = null_answer_cleanup,
 	.answer_preprocess = answer_preprocess,
 	.answer_process = null_answer_process,
Index: kernel/generic/src/ipc/ops/stchngath.c
===================================================================
--- kernel/generic/src/ipc/ops/stchngath.c	(revision 13dbaa8c10f7b449dfe6e0d387ea4a6ee1c07984)
+++ kernel/generic/src/ipc/ops/stchngath.c	(revision 53af6e8cd34bdc25ee8f5917384f7f9ee1112038)
@@ -118,5 +118,7 @@
 sysipc_ops_t ipc_m_state_change_authorize_ops = {
 	.request_preprocess = request_preprocess,
+	.request_forget = null_request_forget,
 	.request_process = null_request_process,
+	.answer_cleanup = null_answer_cleanup,
 	.answer_preprocess = answer_preprocess,
 	.answer_process = null_answer_process,
