mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Fix segfault in dmsetup when using table specification with --table.
Segfault introduced with the patch that added dm_free(_table) at the end of dmsetup (in this release).
This commit is contained in:
parent
12dba91d9d
commit
da3a375f7a
@ -3654,7 +3654,11 @@ static int _process_switches(int *argc, char ***argv, const char *dev_dir)
|
||||
_switches[SHOWKEYS_ARG]++;
|
||||
if (ind == TABLE_ARG) {
|
||||
_switches[TABLE_ARG]++;
|
||||
_table = optarg;
|
||||
if (!(_table = dm_malloc(strlen(optarg + 1)))) {
|
||||
log_error("Could not allocate memory for table string.");
|
||||
return 0;
|
||||
}
|
||||
strcpy(_table, optarg);
|
||||
}
|
||||
if (ind == TREE_ARG)
|
||||
_switches[TREE_ARG]++;
|
||||
|
Loading…
Reference in New Issue
Block a user