1
0
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:
Zdenek Kabelac 2024-05-13 14:48:46 +02:00
parent a1a1e13dbe
commit c0e7cdff9d

View File

@ -7138,6 +7138,7 @@ static int _process_switches(int *argcp, char ***argvp, const char *dev_dir)
}
break;
case TABLE_ARG:
free(_table);
if (!(_table = strdup(optarg))) {
log_error("Could not allocate memory for table string.");
return 0;