tests: plug fd leaks in free_source_with_data
authorPekka Paalanen <ppaalanen@gmail.com>
Fri, 20 Apr 2012 08:21:34 +0000 (11:21 +0300)
committerPekka Paalanen <ppaalanen@gmail.com>
Fri, 20 Apr 2012 11:58:31 +0000 (14:58 +0300)
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
tests/event-loop-test.c

index b1dc3f6..70818b2 100644 (file)
@@ -120,4 +120,9 @@ TEST(free_source_with_data)
        if (context.source2)
                wl_event_source_remove(context.source2);
        wl_event_loop_destroy(loop);
+
+       assert(close(context.p1[0]) == 0);
+       assert(close(context.p1[1]) == 0);
+       assert(close(context.p2[0]) == 0);
+       assert(close(context.p2[1]) == 0);
 }