Index: uspace/app/sbi/src/imode.c
===================================================================
--- uspace/app/sbi/src/imode.c	(revision c5cb943d5d19ad0d75578f54188f2491dfd64937)
+++ uspace/app/sbi/src/imode.c	(revision 8d6c1f139a0fd8ef52d018e1c68b0dcca5ec1ec9)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2010 Jiri Svoboda
+ * Copyright (c) 2011 Jiri Svoboda
  * All rights reserved.
  *
@@ -178,4 +178,17 @@
 			/* Convert expression result to value item. */
 			run_cvt_value_item(&run, rexpr, &rexpr_vi);
+			rdata_item_destroy(rexpr);
+
+			/* Check for unhandled exceptions. */
+			run_exc_check_unhandled(&run);
+		} else {
+			rexpr_vi = NULL;
+		}
+
+		/*
+		 * rexpr_vi can be NULL if either repxr was null or
+		 * if the conversion to value item raised an exception.
+		 */
+		if (rexpr_vi != NULL) {
 			assert(rexpr_vi->ic == ic_value);
 
@@ -184,6 +197,10 @@
 			rdata_value_print(rexpr_vi->u.value);
 			printf("\n");
+
+			rdata_item_destroy(rexpr_vi);
 		}
 	}
+
+	run_proc_ar_destroy(&run, proc_ar);
 
 	/* Remove block visit record from the stack, */
