mirror of
https://github.com/vgough/encfs.git
synced 2025-01-23 06:08:34 +01:00
fix trivial memory leak
This commit is contained in:
parent
19a49b7865
commit
057a5741e7
@ -165,8 +165,8 @@ static int showInfo(int argc, char **argv) {
|
||||
string rootDir = argv[1];
|
||||
if (!checkDir(rootDir)) return EXIT_FAILURE;
|
||||
|
||||
EncFSConfig *config = new EncFSConfig;
|
||||
ConfigType type = readConfig(rootDir, config);
|
||||
std::shared_ptr<EncFSConfig> config(new EncFSConfig);
|
||||
ConfigType type = readConfig(rootDir, config.get());
|
||||
|
||||
// show information stored in config..
|
||||
switch (type) {
|
||||
@ -210,8 +210,7 @@ static int showInfo(int argc, char **argv) {
|
||||
break;
|
||||
}
|
||||
|
||||
showFSInfo(config);
|
||||
delete config;
|
||||
showFSInfo(config.get());
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user