Description of problem: When running lvmetad in valgrind - some leaked memory is reported on exit: i.e.: HEAP SUMMARY: in use at exit: 638 bytes in 30 blocks total heap usage: 17,541 allocs, 17,511 frees, 8,190,915 bytes allocated 3 bytes in 1 blocks are definitely lost in loss record 1 of 5 at 0x4C2DB9D: malloc (vg_replace_malloc.c:299) by 0x59AECC9: strdup (strdup.c:42) by 0x52D6228: dm_strdup_wrapper (dbg_malloc.c:352) by 0x10D1EE: _update_metadata_add_new (lvmetad-core.c:1169) by 0x10E4A5: _update_metadata (lvmetad-core.c:1647) by 0x10FE6B: vg_update (lvmetad-core.c:2298) by 0x111E45: handler (lvmetad-core.c:2835) by 0x1137B1: _client_thread (daemon-server.c:457) by 0x570B6C9: start_thread (pthread_create.c:333) by 0x5A29FDE: clone (clone.S:105) 39 bytes in 1 blocks are definitely lost in loss record 2 of 5 at 0x4C2DB9D: malloc (vg_replace_malloc.c:299) by 0x59AECC9: strdup (strdup.c:42) by 0x52D6228: dm_strdup_wrapper (dbg_malloc.c:352) by 0x10D215: _update_metadata_add_new (lvmetad-core.c:1172) by 0x10E4A5: _update_metadata (lvmetad-core.c:1647) by 0x10FE6B: vg_update (lvmetad-core.c:2298) by 0x111E45: handler (lvmetad-core.c:2835) by 0x1137B1: _client_thread (daemon-server.c:457) by 0x570B6C9: start_thread (pthread_create.c:333) by 0x5A29FDE: clone (clone.S:105) 128 bytes in 16 blocks are definitely lost in loss record 3 of 5 at 0x4C2DB9D: malloc (vg_replace_malloc.c:299) by 0x59AECC9: strdup (strdup.c:42) by 0x52D6228: dm_strdup_wrapper (dbg_malloc.c:352) by 0x10C445: _update_pvid_to_vgid (lvmetad-core.c:804) by 0x10C734: remove_metadata (lvmetad-core.c:864) by 0x10C8EA: vg_remove_if_missing (lvmetad-core.c:908) by 0x10E9E9: pv_gone (lvmetad-core.c:1786) by 0x111CDD: handler (lvmetad-core.c:2826) by 0x1137B1: _client_thread (daemon-server.c:457) by 0x570B6C9: start_thread (pthread_create.c:333) by 0x5A29FDE: clone (clone.S:105) 156 bytes in 4 blocks are definitely lost in loss record 4 of 5 at 0x4C2DB9D: malloc (vg_replace_malloc.c:299) by 0x59AECC9: strdup (strdup.c:42) by 0x52D6228: dm_strdup_wrapper (dbg_malloc.c:352) by 0x10C445: _update_pvid_to_vgid (lvmetad-core.c:804) by 0x10D357: _update_metadata_add_new (lvmetad-core.c:1193) by 0x10E4A5: _update_metadata (lvmetad-core.c:1647) by 0x10FE6B: vg_update (lvmetad-core.c:2298) by 0x111E45: handler (lvmetad-core.c:2835) by 0x1137B1: _client_thread (daemon-server.c:457) by 0x570B6C9: start_thread (pthread_create.c:333) by 0x5A29FDE: clone (clone.S:105) 312 bytes in 8 blocks are definitely lost in loss record 5 of 5 at 0x4C2DB9D: malloc (vg_replace_malloc.c:299) by 0x59AECC9: strdup (strdup.c:42) by 0x52D6228: dm_strdup_wrapper (dbg_malloc.c:352) by 0x10F35D: pv_found (lvmetad-core.c:2067) by 0x111C91: handler (lvmetad-core.c:2823) by 0x1137B1: _client_thread (daemon-server.c:457) by 0x570B6C9: start_thread (pthread_create.c:333) by 0x5A29FDE: clone (clone.S:105) Version-Release number of selected component (if applicable): 2.02.161 How reproducible: Steps to Reproduce: 1. valgrind lvmetad -f 2. 3. Actual results: Expected results: Additional info:
pushed commit 4b4d4670042db3edb1270097f4d6046a6a827bac