ERROR("write_sensu plugin: Unable to alloc memory");
return -1;
}
- strs->strs = realloc(strs->strs, sizeof(char *) * (strs->nb_strs + 1));
+ strs->strs = realloc(strs->strs, strs->nb_strs + 1);
if (strs->strs == NULL) {
strs->strs = old_strs_ptr;
free(newstr);
char *ret_str = NULL;
char *temp_str;
if (list->nb_strs == 0) {
- ret_str = malloc(sizeof(char));
+ ret_str = malloc(1);
if (ret_str == NULL) {
ERROR("write_sensu plugin: Unable to alloc memory");
return NULL;