1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Nicer cleanup of excl_uuid hash

Since it on exit path, it's not a big difference,
but makes less noise in analyzer and valgrind.
This commit is contained in:
Zdenek Kabelac 2012-02-27 11:26:25 +00:00
parent 530efdb525
commit 75f8f3ce8b
2 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.94 -
====================================
Add missing cleanup of excl_uuid hash on some exit paths of clvmd.
Check for existance of vg_name in _format1/_pool_vg_read().
Fix missing break in _format_pvsegs (2.02.92).
Test seg pointer for non-null it in raid_target_percent error path.

View File

@ -345,6 +345,7 @@ int main(int argc, char *argv[])
debug_t debug_arg = DEBUG_OFF;
int clusterwide_opt = 0;
mode_t old_mask;
int ret = 1;
struct option longopts[] = {
{ "help", 0, 0, 'h' },
@ -372,7 +373,8 @@ int main(int argc, char *argv[])
case 'S':
check_permissions();
return restart_clvmd(clusterwide_opt)==1?0:1;
ret = (restart_clvmd(clusterwide_opt) == 1) ? 0 : 1;
goto out;
case 'C':
clusterwide_opt = 1;
@ -402,7 +404,7 @@ int main(int argc, char *argv[])
case 'E':
if (!dm_hash_insert(lvm_params.excl_uuid, optarg, optarg)) {
fprintf(stderr, "Failed to allocate hash entry\n");
return 1;
goto out;
}
break;
case 'T':
@ -624,9 +626,11 @@ int main(int argc, char *argv[])
free(delfd);
}
ret = 0;
out:
dm_hash_destroy(lvm_params.excl_uuid);
return 0;
return ret;
}
/* Called when the cluster layer has completed initialisation.