Index: uspace/lib/libc/generic/device/hw_res.c
===================================================================
--- uspace/lib/libc/generic/device/hw_res.c	(revision 9a66bc2ed74a9425386a5a8717ee6155578308a0)
+++ uspace/lib/libc/generic/device/hw_res.c	(revision 8c069051b9bc1cdcb7cbc1b01fce79aacc0d72ef)
@@ -41,5 +41,4 @@
 bool get_hw_resources(int dev_phone, hw_resource_list_t *hw_resources)
 {
-	bool ret = true;
 	ipcarg_t count = 0;
 	int rc = async_req_1_1(dev_phone, HW_RES_DEV_IFACE, GET_RESOURCE_LIST, &count);
Index: uspace/lib/libc/include/ipc/dev_iface.h
===================================================================
--- uspace/lib/libc/include/ipc/dev_iface.h	(revision 9a66bc2ed74a9425386a5a8717ee6155578308a0)
+++ uspace/lib/libc/include/ipc/dev_iface.h	(revision 8c069051b9bc1cdcb7cbc1b01fce79aacc0d72ef)
@@ -31,4 +31,5 @@
 
 #include <ipc/ipc.h>
+#include <malloc.h>
 
 #define DEV_IFACE_FIRST IPC_FIRST_USER_METHOD
@@ -85,3 +86,10 @@
 } hw_resource_list_t;
 
+static inline void clean_hw_resource_list(hw_resource_list_t *hw_res)
+{
+	free(hw_res->resources);
+	hw_res->resources = 0;
+	hw_res->count = 0;	
+}
+
 #endif
