Skip to content

Commit

Permalink
nathelper: Fixed memory leak in nathelper fetch contact timer (GH #2062)
Browse files Browse the repository at this point in the history
- Allocated buffer is not freed when contact fetch is failed
- Leak frequently occur when database disconnect and reconnect
  • Loading branch information
Pintu Lohar authored and henningw committed Sep 10, 2019
1 parent f99b492 commit 79fecc6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/nathelper/nathelper.c 100644 → 100755
Expand Up @@ -2003,6 +2003,8 @@ static void nh_timer(unsigned int ticks, void *timer_idx)
+ iteration,
natping_processes * natping_interval, options);
if(rval < 0) {
if(buf != NULL)
pkg_free(buf);
LM_ERR("failed to fetch contacts\n");
goto done;
}
Expand Down

0 comments on commit 79fecc6

Please sign in to comment.