From ac4200fa46eebfc9227130739ae7f867e3fd0a20 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Thu, 7 Nov 2013 13:46:12 +0200 Subject: Fix interval initialization from the module_init function. * doc/vmod-binlog.3: Update. * src/binlogsel.c (interval) : Remove const. (interval_add): duplicate the name. * src/xalloc.c (xstrdup): New function. * src/xalloc.h: Likewise. --- src/binlogsel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/binlogsel.c') diff --git a/src/binlogsel.c b/src/binlogsel.c index 547b4ec..80f5b83 100644 --- a/src/binlogsel.c +++ b/src/binlogsel.c @@ -68,7 +68,7 @@ void selglob(const char *dir, const char *pattern); struct interval { struct interval *next; - const char *name; + char *name; int timemask; time_t start; time_t end; @@ -81,7 +81,7 @@ interval_add(const char *name, int tmask, time_t start, time_t end) { struct interval *p = xmalloc(sizeof(*p)); p->next = NULL; - p->name = name; + p->name = xstrdup(name); p->timemask = tmask; p->start = start; p->end = end; -- cgit v1.2.1