chiark / gitweb /
sd-resolve: rename get_next() and get_n_queries() + cleanup
[elogind.git] / src / shared / conf-parser.h
index 42602b3b085bae7c8b2a822409ef48a80e48bf5a..2d5aa31c3b244056e141f6c4aa72e624fbcafc14 100644 (file)
@@ -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;                                   \