You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by yl...@apache.org on 2021/09/18 13:25:17 UTC

svn commit: r1893416 - in /apr/apr-util/branches/1.6.x: ./ include/apr_buckets.h

Author: ylavic
Date: Sat Sep 18 13:25:17 2021
New Revision: 1893416

URL: http://svn.apache.org/viewvc?rev=1893416&view=rev
Log:
Merge r1875097 from trunk:

* include/apr_buckets.h: Ensure macro argument is only expanded
  once for apr_bucket_delete and apr_bucket_destroy.

Submitted by: jorton
Reviewed by: ylavic

Modified:
    apr/apr-util/branches/1.6.x/   (props changed)
    apr/apr-util/branches/1.6.x/include/apr_buckets.h

Propchange: apr/apr-util/branches/1.6.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r1875097

Modified: apr/apr-util/branches/1.6.x/include/apr_buckets.h
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.6.x/include/apr_buckets.h?rev=1893416&r1=1893415&r2=1893416&view=diff
==============================================================================
--- apr/apr-util/branches/1.6.x/include/apr_buckets.h (original)
+++ apr/apr-util/branches/1.6.x/include/apr_buckets.h Sat Sep 18 13:25:17 2021
@@ -997,8 +997,9 @@ APU_DECLARE_NONSTD(void) apr_bucket_free
  * @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)
 
 /**
@@ -1013,8 +1014,9 @@ APU_DECLARE_NONSTD(void) apr_bucket_free
  * @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)
 
 /**