X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fconf-parser.h;h=2d5aa31c3b244056e141f6c4aa72e624fbcafc14;hb=0371ca0dac1d70b2e5060a3c4e6fbbc2bdbd8671;hp=42602b3b085bae7c8b2a822409ef48a80e48bf5a;hpb=71a6151083d842b2f5bf04e50239f0bf85d34d2e;p=elogind.git diff --git a/src/shared/conf-parser.h b/src/shared/conf-parser.h index 42602b3b0..2d5aa31c3 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; \