diff options
author | Joe Orton <jorton@apache.org> | 2020-03-11 17:21:23 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2020-03-11 17:21:23 +0000 |
commit | cdcc44488c0ffb2f5d1019165e57eba049aca594 (patch) | |
tree | d961618d4137b2724c36c3f4f174b950c6074df5 /include | |
parent | 5fd2568c34a8d5c8159d9a5e0f5601f9e8902166 (diff) | |
download | apr-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.h | 10 |
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) /** |