chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
udevd: fix short options in getopt()
[elogind.git]
/
udev
/
udevd.c
diff --git
a/udev/udevd.c
b/udev/udevd.c
index 873634fe4519cf3149201b19727aee22e1b880a1..2808117824905c71458466fae10648e600d374d9 100644
(file)
--- 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));
udev_monitor_enable_receiving(worker_monitor);
worker = calloc(1, sizeof(struct worker));
- if (worker == NULL)
+ if (worker == NULL) {
+ udev_monitor_unref(worker_monitor);
return;
return;
+ }
/* worker + event reference */
worker->refcount = 2;
worker->udev = event->udev;
/* worker + event reference */
worker->refcount = 2;
worker->udev = event->udev;
@@
-1060,7
+1062,7
@@
int main(int argc, char *argv[])
for (;;) {
int option;
for (;;) {
int option;
- option = getopt_long(argc, argv, "cdeDthV", options, NULL);
+ option = getopt_long(argc, argv, "c
:
deDthV", options, NULL);
if (option == -1)
break;
if (option == -1)
break;