fix segfault in udev_example1.c due to free