Fix route->channels double-free corruption.
The code assumes that route->channels is NULL when route->channels_len is 0, such that free(route->channels) will work. Think about this scenario: update(r, some channels) # route->channels = malloc(…) update(r, no channel) # free(route->channels) update(r, no channel) # free(route->channels) Thanks to Dave Taht for pointing the issue.
Showing
Please register or sign in to comment