Added reset of pointer after memory free to avoid double-free crash
authorChristophe CURIS <christophe.curis@free.fr>
Wed, 14 Nov 2012 20:23:32 +0000 (21:23 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Wed, 14 Nov 2012 22:39:37 +0000 (22:39 +0000)
commit7746fe7c5a46a58eb5a2e5393487de8213bb0a42
tree438c3e1a05d27378d6d66fdf104b386e3b9c9b9a
parent5dcd31acbe94959656e4d971c0f4b462a0bfb7c7
Added reset of pointer after memory free to avoid double-free crash

As reported by Rodolfo, there are some cases when working with icons
where a crash can occur, which is related to trying to re-release
some memory that have been already freed previously.

This patch adds a reset-to-NULL of the corresponding pointers so that
on next usage wmaker will know there's no more memory associated with
these pointers.
src/icon.c