summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/shared/conf-parser.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/conf-parser.h b/src/shared/conf-parser.h
index 42602b3b08..2d5aa31c3b 100644
--- a/src/shared/conf-parser.h
+++ b/src/shared/conf-parser.h
@@ -202,7 +202,7 @@ int log_syntax_internal(const char *unit, int level,
continue; \
\
*(xs + i) = x; \
- xs = realloc(xs, ++i + 1); \
+ xs = realloc(xs, (++i + 1) * sizeof(type)); \
if (!xs) \
return -ENOMEM; \
*(xs + i) = invalid; \