projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e0cdf8
)
journal-cat: don't allocate memory for the syslog identifier
author
Lennart Poettering
<lennart@poettering.net>
Sun, 31 Jan 2016 22:55:06 +0000
(23:55 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 1 Feb 2016 21:18:15 +0000
(22:18 +0100)
Fixes: #2490
src/journal/cat.c
patch
|
blob
|
history
diff --git
a/src/journal/cat.c
b/src/journal/cat.c
index
7fd4198
..
07c3df5
100644
(file)
--- a/
src/journal/cat.c
+++ b/
src/journal/cat.c
@@
-34,7
+34,7
@@
#include "syslog-util.h"
#include "util.h"
-static char *arg_identifier = NULL;
+static c
onst c
har *arg_identifier = NULL;
static int arg_priority = LOG_INFO;
static bool arg_level_prefix = true;
@@
-82,14
+82,10
@@
static int parse_argv(int argc, char *argv[]) {
return version();
case 't':
- free(arg_identifier);
if (isempty(optarg))
arg_identifier = NULL;
- else {
- arg_identifier = strdup(optarg);
- if (!arg_identifier)
- return log_oom();
- }
+ else
+ arg_identifier = optarg;
break;
case 'p':