regexAtaOrHost = regexAta;
} else {
+ g_match_info_free(matchInfo);
COMP_STATIC_REGEX(regexHostPath, "^.*/host(\\d+)$", gErr, exit)
if (g_regex_match(regexHostPath, realPath, 0, &matchInfo)) {
COMP_STATIC_REGEX(regexHost, "^host(\\d+)$", gErr, exit)
for (fileNum = 0; fileNum < numFiles; fileNum++) {
int currHost;
+ g_match_info_free(matchInfo);
if (g_regex_match(regexAtaOrHost, fileNameList[fileNum], 0, &matchInfo)) {
g_free(charHost);
charHost = g_match_info_fetch(matchInfo, 1);
pciDevPath);
}
for (fileNum = 0; fileNum < numFiles; fileNum++) {
+ g_match_info_free(matchInfo);
if (g_regex_match(regexSas, fileNameList[fileNum], 0, &matchInfo)) {
free(*unit); /* free previous "unit" string */
*unit = g_match_info_fetch(matchInfo, 1);
/* Check for NVMe device. */
COMP_STATIC_REGEX(regexNvme, "^.*/nvme\\d+$", gErr, finished)
+ g_match_info_free(matchInfo);
if (!g_regex_match(regexNvme, realPath, 0, &matchInfo)) {
g_debug("%s: block disk device pattern not found\n", __FUNCTION__);
goto finished;