summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2020-03-11 17:21:23 +0000
committerjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2020-03-11 17:21:23 +0000
commit1186067f5c4d752d95476495ad169473f2abe84a (patch)
treed961618d4137b2724c36c3f4f174b950c6074df5 /include
parent0aded11371e9d7fc4ccb45ec4bd72f0d4c8e3d7d (diff)
downloadlibapr-1186067f5c4d752d95476495ad169473f2abe84a.tar.gz
* include/apr_buckets.h: Ensure macro argument is only expanded
once for apr_bucket_delete and apr_bucket_destroy. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1875097 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r--include/apr_buckets.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/apr_buckets.h b/include/apr_buckets.h
index 0208035e1..0725c6cd9 100644
--- a/include/apr_buckets.h
+++ b/include/apr_buckets.h
@@ -1030,8 +1030,9 @@ APR_DECLARE_NONSTD(void) apr_bucket_free(void *block)
* @param e The bucket to destroy
*/
#define apr_bucket_destroy(e) do { \
- (e)->type->destroy((e)->data); \
- (e)->free(e); \
+ apr_bucket *apr__d = (e); \
+ apr__d->type->destroy(apr__d->data); \
+ apr__d->free(apr__d); \
} while (0)
/**
@@ -1046,8 +1047,9 @@ APR_DECLARE_NONSTD(void) apr_bucket_free(void *block)
* @param e The bucket to delete
*/
#define apr_bucket_delete(e) do { \
- APR_BUCKET_REMOVE(e); \
- apr_bucket_destroy(e); \
+ apr_bucket *apr__b = (e); \
+ APR_BUCKET_REMOVE(apr__b); \
+ apr_bucket_destroy(apr__b); \
} while (0)
/**