X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev%2Fudevd.c;h=2808117824905c71458466fae10648e600d374d9;hb=4ab3c463d418c74275eb8170a87c8cf75e47d973;hp=873634fe4519cf3149201b19727aee22e1b880a1;hpb=35df38c36a65bd0a9fd108f7e10ea6a593d5cdd7;p=elogind.git diff --git a/udev/udevd.c b/udev/udevd.c index 873634fe4..280811782 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -227,8 +227,10 @@ static void worker_new(struct event *event) udev_monitor_enable_receiving(worker_monitor); worker = calloc(1, sizeof(struct worker)); - if (worker == NULL) + if (worker == NULL) { + udev_monitor_unref(worker_monitor); return; + } /* worker + event reference */ worker->refcount = 2; worker->udev = event->udev; @@ -1060,7 +1062,7 @@ int main(int argc, char *argv[]) for (;;) { int option; - option = getopt_long(argc, argv, "cdeDthV", options, NULL); + option = getopt_long(argc, argv, "c:deDthV", options, NULL); if (option == -1) break;