1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 18:45:10 +00:00

Put zero in free_and_zero

This commit is contained in:
Pavel Labath 2010-02-23 19:36:47 +01:00
parent 45dfe4994d
commit c9447ddb8e

View File

@ -368,7 +368,8 @@ extern enum x_initialiser_state x_initialised;
#define UNUSED(a) (void)a
#define UNUSED_ATTR __attribute__ ((unused))
template <class T> void free_and_zero(T *ptr) {
template <class T>
void free_and_zero(T *&ptr) {
if(ptr) {
free(ptr);
ptr = NULL;