]> err.no Git - systemd/commitdiff
libudev: queue - accept NULL passed into udev_queue_export_cleanup()
authorNix <nix@esperi.org.uk>
Mon, 16 May 2011 20:51:38 +0000 (22:51 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Mon, 16 May 2011 20:51:38 +0000 (22:51 +0200)
libudev/libudev-queue-private.c

index 0dcf9b00204cb2c1877f0107edadff51a5c6e1ec..6e13d8a3d95dbfe1f29a804326da5eca1ba58222 100644 (file)
@@ -104,9 +104,10 @@ void udev_queue_export_cleanup(struct udev_queue_export *udev_queue_export)
 {
        char filename[UTIL_PATH_SIZE];
 
+       if (udev_queue_export == NULL)
+               return;
        util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev_queue_export->udev), "/queue.tmp", NULL);
        unlink(filename);
-
        util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev_queue_export->udev), "/queue.bin", NULL);
        unlink(filename);
 }