mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 04:55:18 +00:00
Fix Memory Leak in virStorageFileGetMetadataRecurse()
While running virstoragetest, valgrind pointed out the following memory leak: ==8142== 2 bytes in 1 blocks are definitely lost in loss record 1 of 92 ==8142== at 0x4A069EE: malloc (vg_replace_malloc.c:270) ==8142== by 0x4E7B53E: mdir_name (dirname-lgpl.c:78) ==8142== by 0x4CBE2B0: virStorageFileGetMetadataInternal (virstoragefile.c:595) ==8142== by 0x4CBE651: virStorageFileGetMetadataFromFDInternal (virstoragefile.c:1086) ==8142== by 0x4CBEEB4: virStorageFileGetMetadataRecurse (virstoragefile.c:1175) ==8142== by 0x4CBF1DE: virStorageFileGetMetadata (virstoragefile.c:1270) ==8142== by 0x4028AD: testStorageChain (virstoragetest.c:275) ==8142== by 0x407B91: virtTestRun (testutils.c:201) ==8142== by 0x4039D7: mymain (virstoragetest.c:534) ==8142== by 0x40830D: virtTestMain (testutils.c:789) ==8142== by 0x3E6CE1ED1C: (below main) (libc-start.c:226) ...62 times
This commit is contained in:
parent
a4209f5379
commit
ab07a7b358
@ -1213,6 +1213,7 @@ virStorageFileGetMetadataRecurse(const char *path, const char *canonPath,
|
||||
meta->backingMeta = backing;
|
||||
}
|
||||
}
|
||||
VIR_FREE(backingDirectory);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user