Plug small memory leaks.

This commit is contained in:
Alexander Motin 2012-05-06 12:55:20 +00:00
parent deb35287b3
commit eb3b1cd0de
2 changed files with 5 additions and 1 deletions

View File

@ -1228,7 +1228,7 @@ ddf_meta_read(struct g_consumer *cp, struct ddf_meta *meta)
}
done:
free(abuf, M_MD_DDF);
g_free(abuf);
if (error != 0)
ddf_meta_free(meta);
return (error);
@ -3039,6 +3039,8 @@ g_raid_md_free_volume_ddf(struct g_raid_md_object *md,
mdi->mdio_starting--;
callout_stop(&pv->pv_start_co);
}
free(pv, M_MD_DDF);
vol->v_md_data = NULL;
return (0);
}

View File

@ -1955,6 +1955,8 @@ g_raid_md_free_volume_promise(struct g_raid_md_object *md,
pv->pv_started = 1;
callout_stop(&pv->pv_start_co);
}
free(pv, M_MD_PROMISE);
vol->v_md_data = NULL;
return (0);
}