diff --git a/Makefile b/Makefile
index 200f01f839231d4e5e33e90e041477ef760d5cbb..cf318dc2da69e221e34d1a79e59515c319fc87cd 100644
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,7 @@ utils.dir: src.dir
 
 build: $(patsubst %,%.dir, $(BUILDDIRS))
 
-CHECKS = $(patsubst %,%.checkdir,$(filter-out linux, $(SRCDIRS)))
+CHECKS = $(patsubst %,%.checkdir,$(SRCDIRS))
 
 # This is the original check rule
 # The stuff below allows "make -j2 -k check" to work
diff --git a/linux/Makefile b/linux/Makefile
index 775a0e550fd245ec1827b8db0d5b98d7c434c0d2..82b8ec400b2a77d32c8a57d05f92ac791192f4bf 100644
--- a/linux/Makefile
+++ b/linux/Makefile
@@ -22,6 +22,10 @@ $(TARGET): $(OBJS)
 $(OBJS): CFLAGS += -DTOKU_ALLOW_DEPRECATED
 #Blank on purpose
 
+check: $(TARGET)
+	cd tests; $(MAKE) check
+
 clean:
 	rm -rf $(TARGET) $(LIBPORTABILITY)
+	cd tests; $(MAKE) clean
 
diff --git a/linux/tests/test-wss.c b/linux/tests/test-wss.c
index 78fe6dbf7ba29b810b902886688231e00af4dfd1..632cb1d971cbda7fe3fc2d9aa220add59bdb9ba1 100644
--- a/linux/tests/test-wss.c
+++ b/linux/tests/test-wss.c
@@ -11,11 +11,14 @@ const int buffersize = 1024*1024;
 
 static void do_mallocs(void) {
     int i;
+    void *vp[nbuffers];
     for (i=0; i<nbuffers; i++) {
         int nbytes = buffersize;
-        void *vp = malloc(nbytes);
-        memset(vp, 0, nbytes);
+        vp[i] = malloc(nbytes);
+        memset(vp[i], 0, nbytes);
     }
+    for (i=0; i<nbuffers; i++)
+        free(vp[i]);
 }
 
 int main(int argc, char *argv[]) {