]> sourceware.org Git - lvm2.git/commit
python-lvm: Memory leaks & seg. fault fixes
authorTony Asleson <tasleson@redhat.com>
Thu, 25 Oct 2012 22:31:11 +0000 (17:31 -0500)
committerTony Asleson <tasleson@redhat.com>
Thu, 25 Oct 2012 23:09:10 +0000 (18:09 -0500)
commitbbff143d54b890f3b9c91b302f0322469ba56ef6
treea6b4bc224bbf381058d6291059db35c98d399369
parent291909ecafbf5594c145516c19c2ce87c874ffb1
python-lvm: Memory leaks & seg. fault fixes

Issues found (thus far) in unit test developemnt for python bindings.

Added Py_DECREF(ptr) in liblvm_lvm_vg_open & liblvm_lvm_vg_create
in error paths so that we correctly clean up memory.

Added a call to lvm_vg_close when we remove a vg.  The code was
clearing out the vg pointer which prevented us from actually
calling lvm_vg_close in the close path.

liblvm_lvm_vg_create_lv_linear was not initializing
lvobj->parent_vgobj and if lvm_vg_create_lv_linear failed
we went through liblvm_lv_dealloc on clean up and tried to
Py_DECREF an invalid pointer.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
python/liblvm.c
This page took 0.035869 seconds and 5 git commands to generate.