impl-module: don't leak filename

When dlopen fails, don't leak the filename.
Fix indentation.
This commit is contained in:
Wim Taymans 2021-11-17 12:43:46 +01:00
parent 947ee152d3
commit 6d492db948

View file

@ -190,9 +190,12 @@ pw_context_load_module(struct pw_context *context,
hnd = dlopen(filename, RTLD_NOW | RTLD_LOCAL);
if (hnd != NULL)
break;
free(filename);
filename = NULL;
}
}
}
}
if (filename == NULL)
goto error_not_found;