Skip to content

Commit

Permalink
fixed a ksm leak
Browse files Browse the repository at this point in the history
  • Loading branch information
roberto@oneiric64 committed Nov 26, 2011
1 parent a1564a4 commit 543271e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion utils.c
Expand Up @@ -802,14 +802,19 @@ void uwsgi_linux_ksm_map(void) {
}
}

free(ksm_mappings_last);
if (ksm_mappings_last)
free(ksm_mappings_last);
ksm_mappings_last = ksm_mappings_current;
ksm_mappings_last_lines = ksm_mappings_current_lines;

if (errors >= ksm_mappings_current_lines) {
uwsgi_error("[uwsgi-KSM] unable to share pages");
}
}
// if not dirty, free ksm_mappings_current
else {
free(ksm_mappings_current);
}
}
}
#endif
Expand Down

0 comments on commit 543271e

Please sign in to comment.