chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
man: fix typos
[elogind.git]
/
extras
/
collect
/
collect.c
diff --git
a/extras/collect/collect.c
b/extras/collect/collect.c
index 355b85b5cfdb6199c63caa95bb1c5acf3b1d33a9..3a7e826e4dfd0ce80b914cdfd0196d1cb66ce529 100644
(file)
--- a/
extras/collect/collect.c
+++ b/
extras/collect/collect.c
@@
-171,8
+171,7
@@
static int checkout(int fd)
if (debug)
fprintf(stderr, "Found word %s\n", word);
him = malloc(sizeof (struct _mate));
if (debug)
fprintf(stderr, "Found word %s\n", word);
him = malloc(sizeof (struct _mate));
- him->name = malloc(strlen(word) + 1);
- strcpy(him->name, word);
+ him->name = strdup(word);
him->state = STATE_OLD;
udev_list_node_append(&him->node, &bunch);
word = NULL;
him->state = STATE_OLD;
udev_list_node_append(&him->node, &bunch);
word = NULL;