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;
void module_register(void) {
plugin_register_complex_config("write_sensu", sensu_config);
}
-
-/* vim: set sw=8 sts=8 ts=8 noet : */