1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

clvmd: fix memleak on exit

This patch will releases allocated private resources from
startup. Needs previous dm_zalloc patch to ensure unset
private pointer is NULL.

TODO: check on real cluster.
This commit is contained in:
Zdenek Kabelac 2014-03-08 23:16:31 +01:00
parent 38ce06e448
commit 460c19df62
2 changed files with 2 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.106 - Version 2.02.106 -
==================================== ====================================
Cleanup all client resources on clvmd exit.
Use dm_zalloc to clear members of clvmd client struct. Use dm_zalloc to clear members of clvmd client struct.
Use BLKID_CFLAGS when compiling with blkid support. Use BLKID_CFLAGS when compiling with blkid support.
Use correct rl_completion_func_t typedef for new readline. Use correct rl_completion_func_t typedef for new readline.

View File

@ -633,6 +633,7 @@ int main(int argc, char *argv[])
* break of 'clvmd' may access already free memory here. * break of 'clvmd' may access already free memory here.
*/ */
safe_close(&(delfd->fd)); safe_close(&(delfd->fd));
cmd_client_cleanup(delfd);
dm_free(delfd); dm_free(delfd);
} }