aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/snowball/compiler
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-26 17:35:31 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-26 17:35:31 +0100
commit948b91b47579a02506bb416d35e58c896a0a8d6a (patch)
treec231ba4d08262b99ceaa6667a715d0ebac8ea52d /contrib/snowball/compiler
parente7d92f9a0a4a90778861b3247297a60e7bf464c9 (diff)
downloadrspamd-948b91b47579a02506bb416d35e58c896a0a8d6a.tar.gz
rspamd-948b91b47579a02506bb416d35e58c896a0a8d6a.zip
[Minor] Fix uninit values usage
Diffstat (limited to 'contrib/snowball/compiler')
-rw-r--r--contrib/snowball/compiler/space.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/snowball/compiler/space.c b/contrib/snowball/compiler/space.c
index cd5fd863d..310024e76 100644
--- a/contrib/snowball/compiler/space.c
+++ b/contrib/snowball/compiler/space.c
@@ -97,7 +97,7 @@ int space_count = 0;
extern void * check_malloc(int n) {
space_count++;
- return malloc(n);
+ return calloc(1, n);
}
extern void check_free(void * p) {
@@ -109,7 +109,7 @@ extern void check_free(void * p) {
extern char * b_to_s(symbol * p) {
int n = SIZE(p);
- char * s = (char *)malloc(n + 1);
+ char * s = (char *)calloc(1, n + 1);
{
int i;
for (i = 0; i < n; i++) {
@@ -155,7 +155,7 @@ struct str {
/* Create a new string. */
extern struct str * str_new() {
- struct str * output = (struct str *) malloc(sizeof(struct str));
+ struct str * output = (struct str *) calloc(1, sizeof(struct str));
output->data = create_b(0);
return output;
}