Index: uspace/srv/fs/devfs/devfs_ops.c
===================================================================
--- uspace/srv/fs/devfs/devfs_ops.c	(revision 415c7e0dffd9a61936ae7ae8ebcb40e5f19f768a)
+++ uspace/srv/fs/devfs/devfs_ops.c	(revision 95bc57cf68d3313bd1ab4ae930757d5fa26a00e5)
@@ -287,5 +287,5 @@
 	size_t size;
 	if (!ipc_data_read_receive(&callid, &size) ||
-	    size < sizeof(struct stat)) {
+	    size != sizeof(struct stat)) {
 		ipc_answer_0(callid, EINVAL);
 		ipc_answer_0(rid, EINVAL);
@@ -293,18 +293,13 @@
 	}
 
-	struct stat *stat = malloc(sizeof(struct stat));
-	if (!stat) {
-		ipc_answer_0(callid, ENOMEM);
-		ipc_answer_0(rid, ENOMEM);
-		return;
-	}
-	memset(stat, 0, sizeof(struct stat));
-
-	stat->fs_handle = devfs_reg.fs_handle;
-	stat->dev_handle = dev_handle;
-	stat->index = index;
-	stat->lnkcnt = 1;
-	stat->is_file = (index != 0);
-	stat->size = 0;
+	struct stat stat;
+	memset(&stat, 0, sizeof(struct stat));
+
+	stat.fs_handle = devfs_reg.fs_handle;
+	stat.dev_handle = dev_handle;
+	stat.index = index;
+	stat.lnkcnt = 1;
+	stat.is_file = (index != 0);
+	stat.size = 0;
 	
 	if (index != 0) {
@@ -316,12 +311,10 @@
 		link_t *lnk = hash_table_find(&devices, key);
 		if (lnk != NULL) 
-			stat->devfs_stat.device = (dev_handle_t)index;
+			stat.devfs_stat.device = (dev_handle_t)index;
 		fibril_mutex_unlock(&devices_mutex);
 	}
 
-	ipc_data_read_finalize(callid, stat, sizeof(struct stat));
+	ipc_data_read_finalize(callid, &stat, sizeof(struct stat));
 	ipc_answer_0(rid, EOK);
-
-	free(stat);
 }
 
