1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-25 21:57:45 +03:00

pvscan: fix memleak

Commit 25b58310e3d606a85abc9bd50991ccb7ddcbfe25 add zalloc()
without correspoding free(), switch to use cmd mempool.
This commit is contained in:
Zdenek Kabelac 2021-04-23 15:11:36 +02:00
parent 5e8307f4bf
commit 65c4f81dc2

View File

@ -848,7 +848,7 @@ static int _get_devs_from_saved_vg(struct cmd_context *cmd, const char *vgname,
goto bad;
}
if (!(devl = zalloc(sizeof(*devl))))
if (!(devl = dm_pool_zalloc(cmd->mem, sizeof(*devl))))
goto_bad;
devl->dev = dev;