]> git.k1024.org Git - pyxattr.git/commit
Fix memory leak on get_all OutOfMemory handling path
authorIustin Pop <iustin@k1024.org>
Thu, 30 Apr 2015 22:43:16 +0000 (00:43 +0200)
committerIustin Pop <iustin@k1024.org>
Thu, 30 Apr 2015 22:43:16 +0000 (00:43 +0200)
commit21751a14bea4e6794c9941fad74d8116b43ea586
tree64e53e8004385bb0466641edababd2b2cea65def
parentce2913488e2a9d53b4bb87618544ad574c05a582
Fix memory leak on get_all OutOfMemory handling path

It's unlikely that the situation is recoverable when failing to
allocate memory, but the current code is clearly buggy: PyMem_Realloc
doesn't clobber the existing buffer on failure, so not deallocating it
will result in a leak.
xattr.c