test: initialize syspath
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 6 Jul 2015 01:37:46 +0000 (11:37 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 6 Jul 2015 01:38:39 +0000 (11:38 +1000)
When the condition with continue was hit, syspath was still compared in the
loop condition, leading to crashes when strcmp()-ing a random string.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/litest.c

index df521fe..ab69d6c 100644 (file)
@@ -1834,7 +1834,7 @@ litest_create_uinput_device_from_description(const char *name,
        struct udev_monitor *udev_monitor;
        struct udev_device *udev_device;
        const char *udev_action;
-       const char *udev_syspath;
+       const char *udev_syspath = NULL;
 
        udev = udev_new();
        litest_assert_notnull(udev);