Index: uspace/lib/libfs/libfs.c
===================================================================
--- uspace/lib/libfs/libfs.c	(revision 75160a6bc04fa335c32a5a4f3303f0e14fb1c6ef)
+++ uspace/lib/libfs/libfs.c	(revision 03156796f383f3e502a9fe8a17dbd739c4f407c2)
@@ -440,5 +440,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);
@@ -446,23 +446,16 @@
 	}
 
-	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 = fs_handle;
-	stat->dev_handle = dev_handle;
-	stat->index = index;
-	stat->lnkcnt = ops->lnkcnt_get(fn); 
-	stat->is_file = ops->is_file(fn);
-	stat->size = ops->size_get(fn);
-
-	ipc_data_read_finalize(callid, stat, sizeof(struct stat));
+	struct stat stat;
+	memset(&stat, 0, sizeof(struct stat));
+	
+	stat.fs_handle = fs_handle;
+	stat.dev_handle = dev_handle;
+	stat.index = index;
+	stat.lnkcnt = ops->lnkcnt_get(fn); 
+	stat.is_file = ops->is_file(fn);
+	stat.size = ops->size_get(fn);
+
+	ipc_data_read_finalize(callid, &stat, sizeof(struct stat));
 	ipc_answer_0(rid, EOK);
-
-	free(stat);
 }
 
