mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cov: enusure _table doesn't leak
If someone would enter _table multiple times by mistatek, there is 'teroretical' leak - although doesn't matter much in this case...
This commit is contained in:
parent
a1a1e13dbe
commit
c0e7cdff9d
@ -7138,6 +7138,7 @@ static int _process_switches(int *argcp, char ***argvp, const char *dev_dir)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TABLE_ARG:
|
case TABLE_ARG:
|
||||||
|
free(_table);
|
||||||
if (!(_table = strdup(optarg))) {
|
if (!(_table = strdup(optarg))) {
|
||||||
log_error("Could not allocate memory for table string.");
|
log_error("Could not allocate memory for table string.");
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user