diff --git a/src/debug.c b/src/debug.c index 8f1e42d46..80340bd65 100644 --- a/src/debug.c +++ b/src/debug.c @@ -80,9 +80,9 @@ void flag_add(char ch) } else { - extraflags = malloc(2); + extraflags = safe_alloc(2); extraflags[0] = ch; - extraflags[1] = 0; + extraflags[1] = '\0'; } } diff --git a/src/modules/sajoin.c b/src/modules/sajoin.c index 59521420a..d0331951d 100644 --- a/src/modules/sajoin.c +++ b/src/modules/sajoin.c @@ -256,7 +256,7 @@ CMD_FUNC(cmd_sajoin) { opermode = 0; sajoinmode = 1; - mode_args[0] = (char*)malloc(2); + mode_args[0] = safe_alloc(2); mode_args[0][0] = mode; mode_args[0][1] = '\0'; mode_args[1] = acptr->name;