Index: kernel/generic/include/ipc/irq.h
===================================================================
--- kernel/generic/include/ipc/irq.h	(revision 79f30e4f9ac9fbe8dece9d8d97a63496370dc290)
+++ kernel/generic/include/ipc/irq.h	(revision 4874c2dc3da3748951cb71f24805c35b88106d0f)
@@ -79,4 +79,5 @@
  */
 struct ipc_notif_cfg {
+	bool notify;			/**< When false, notifications are not sent. */
 	answerbox_t *answerbox;		/**< Answerbox for notifications. */
 	unative_t method;		/**< Method to be used for the notification. */
Index: kernel/generic/src/ipc/irq.c
===================================================================
--- kernel/generic/src/ipc/irq.c	(revision 79f30e4f9ac9fbe8dece9d8d97a63496370dc290)
+++ kernel/generic/src/ipc/irq.c	(revision 4874c2dc3da3748951cb71f24805c35b88106d0f)
@@ -177,9 +177,10 @@
 	if (irq) {
 		if (irq->notif_cfg.answerbox == box) {
-			code_free(irq->notif_cfg.code);
+			irq->notif_cfg.notify = false;
+			irq->notif_cfg.answerbox = NULL;
 			irq->notif_cfg.code = NULL;
-			irq->notif_cfg.answerbox = NULL;
 			irq->notif_cfg.method = 0;
 			irq->notif_cfg.counter = 0;
+			code_free(irq->notif_cfg.code);
 			spinlock_unlock(&irq->lock);
 		}
@@ -227,4 +228,5 @@
 	}
 	
+	irq->notif_cfg.notify = true;
 	irq->notif_cfg.answerbox = box;
 	irq->notif_cfg.method = method;
