Skip to content

Commit

Permalink
fix invalid read and possible crash
Browse files Browse the repository at this point in the history
  • Loading branch information
tony2001 committed Jan 27, 2010
1 parent 46d6cc1 commit cdf7b66
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sapi/fpm/fpm/fpm_worker_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ static void fpm_worker_pool_cleanup(int which, void *arg) /* {{{ */
fpm_array_free(&wp->slots_used);
fpm_array_free(&wp->slots_free);
fpm_shm_free_list(wp->shm_list, which == FPM_CLEANUP_CHILD ? fpm_shm_slots_mem() : 0);
if (wp->shm_status && which != FPM_CLEANUP_CHILD) {
fpm_shm_free(wp->shm_status, !fpm_globals.is_child);
}
free(wp->config);
free(wp->user);
free(wp->home);
free(wp);
if (wp->shm_status && which != FPM_CLEANUP_CHILD) {
fpm_shm_free(wp->shm_status, !fpm_globals.is_child);
}
}
fpm_worker_all_pools = 0;
}
Expand Down

0 comments on commit cdf7b66

Please sign in to comment.