diff options
author | Simo Sorce <simo@redhat.com> | 2012-11-14 13:01:13 +0000 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2012-11-28 13:36:12 +0100 |
commit | 048bd9dd3f616fee1ff401db2e72cf833213e766 (patch) | |
tree | 60bcfee2c57549013a451989baf95d7eac6c99e2 | |
parent | d6f283302268520c1506fb3da4f2a22f5a741be5 (diff) | |
download | sssd-048bd9dd3f616fee1ff401db2e72cf833213e766.tar.gz sssd-048bd9dd3f616fee1ff401db2e72cf833213e766.tar.bz2 sssd-048bd9dd3f616fee1ff401db2e72cf833213e766.zip |
Revert "Avoid accessing half-deallocated memory when using talloc_zfree macro."
This reverts commit ff57c6aeb80a52b1f52bd1dac9308a69dc7a4774.
This commit doesn't really make sense, we are never accessing freed
memory as all we are dealing with is a pointer which is never itsef
part of the memory we are freeing (if it were, it would be an error
in the caller and we shouldn't mask it in this macro).
-rw-r--r-- | src/util/util.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/util/util.h b/src/util/util.h index 75ac771b..64ad0257 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -231,11 +231,7 @@ errno_t set_debug_file_from_fd(const int fd); #define FLAGS_PID_FILE 0x0004 #ifndef talloc_zfree -#define talloc_zfree(ptr) do { \ - TALLOC_CTX *_tmp_ctx = ptr; \ - ptr = NULL; \ - talloc_free(_tmp_ctx); \ - } while(0) +#define talloc_zfree(ptr) do { talloc_free(ptr); ptr = NULL; } while(0) #endif #ifndef discard_const_p |