Properly free blkid_probe in TWPartition::Check_FS_Type()
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
diff --git a/partition.cpp b/partition.cpp
index 9ab60ba..7cf0ab3 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -1214,13 +1214,15 @@
LOGINFO("Can't probe device %s\n", Actual_Block_Device.c_str());
return;
}
+
if (blkid_probe_lookup_value(pr, "TYPE", &type, NULL) < 0) {
blkid_free_probe(pr);
LOGINFO("can't find filesystem on device %s\n", Actual_Block_Device.c_str());
return;
}
+
Current_File_System = type;
- return;
+ blkid_free_probe(pr);
}
bool TWPartition::Wipe_EXT23(string File_System) {