If configure fails after allocing mpvec, it must free it. Found by
coverity.
Reviewed-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
ret = path_discovery(vecs->pathvec, DI_ALL);
if (ret < 0) {
condlog(0, "configure failed at path discovery");
ret = path_discovery(vecs->pathvec, DI_ALL);
if (ret < 0) {
condlog(0, "configure failed at path discovery");
}
vector_foreach_slot (vecs->pathvec, pp, i){
}
vector_foreach_slot (vecs->pathvec, pp, i){
}
if (map_discovery(vecs)) {
condlog(0, "configure failed at map discovery");
}
if (map_discovery(vecs)) {
condlog(0, "configure failed at map discovery");
force_reload = FORCE_RELOAD_YES;
if (ret) {
condlog(0, "configure failed while coalescing paths");
force_reload = FORCE_RELOAD_YES;
if (ret) {
condlog(0, "configure failed while coalescing paths");
*/
if (coalesce_maps(vecs, mpvec)) {
condlog(0, "configure failed while coalescing maps");
*/
if (coalesce_maps(vecs, mpvec)) {
condlog(0, "configure failed while coalescing maps");
+
+fail:
+ vector_free(mpvec);
+ return 1;