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:
parent
45dfe4994d
commit
c9447ddb8e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user