Use safe wrappers wherever possible

This commit is contained in:
shdown
2015-08-03 12:50:50 +03:00
parent bc52fae15c
commit c85d16faa4
14 changed files with 31 additions and 52 deletions

View File

@ -900,7 +900,7 @@ static int add_subscription(void *extra, const unsigned char *s,
int event = client->num_events;
client->num_events++;
client->events = realloc(client->events, client->num_events * sizeof(char *));
client->events = srealloc(client->events, client->num_events * sizeof(char *));
/* We copy the string because it is not null-terminated and strndup()
* is missing on some BSD systems */
client->events[event] = scalloc(len + 1, 1);