mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Log: Fix broken syslog name
BIRD passed string from configuration to openlog(), which kept it internally. After reconfiguration the old string was freed, therefore openlog had invalid copy. Thanks to Chris Caputo for the original patch.
This commit is contained in:
@@ -30,6 +30,15 @@ static inline char *xbasename(const char *str)
|
||||
return s ? s+1 : (char *) str;
|
||||
}
|
||||
|
||||
static inline char *
|
||||
xstrdup(const char *c)
|
||||
{
|
||||
size_t l = strlen(c) + 1;
|
||||
char *z = xmalloc(l);
|
||||
memcpy(z, c, l);
|
||||
return z;
|
||||
}
|
||||
|
||||
#define ROUTER_ID_64_LENGTH 23
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user