commit - 7ec19d2985caae5d11c825f612fc920a3588e8d4
commit + 98eb4de836f36a52f9c5a01cb4f634e76d1af8b5
blob - 042a90dab916eb96a7d9c081d4f900bf4de04ffb
blob + 1a6f8a11b0a1552850f0313a22ec299050d7e86d
--- src/lib/core/say.c
+++ src/lib/core/say.c
return -1;
log->syslog_server_type = opts.server_type;
- if (log->syslog_server_type != SAY_SYSLOG_DEFAULT) {
- log->path = strdup(opts.server_path);
- if (log->path == NULL) {
- diag_set(OutOfMemory, strlen(opts.server_path),
- "malloc", "server address");
- return -1;
- }
- }
- if (opts.identity == NULL)
- log->syslog_ident = strdup("tarantool");
+ if (log->syslog_server_type != SAY_SYSLOG_DEFAULT)
+ log->path = xstrdup(opts.server_path);
+ if (opts.identity == NULL)
+ log->syslog_ident = xstrdup("tarantool");
else
- log->syslog_ident = strdup(opts.identity);
- if (log->syslog_ident == NULL) {
- diag_set(OutOfMemory, strlen(opts.identity), "malloc",
- "log->syslog_ident");
- return -1;
- }
+ log->syslog_ident = xstrdup(opts.identity);
if (opts.facility == syslog_facility_MAX)
log->syslog_facility = SYSLOG_LOCAL7;