summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2020-03-11 17:21:23 +0000
committerJoe Orton <jorton@apache.org>2020-03-11 17:21:23 +0000
commitcdcc44488c0ffb2f5d1019165e57eba049aca594 (patch)
treed961618d4137b2724c36c3f4f174b950c6074df5 /include
parent5fd2568c34a8d5c8159d9a5e0f5601f9e8902166 (diff)
downloadapr-cdcc44488c0ffb2f5d1019165e57eba049aca594.tar.gz
* include/apr_buckets.h: Ensure macro argument is only expanded
once for apr_bucket_delete and apr_bucket_destroy. git-svn-id: https://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)
/**