diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2013-08-20 10:51:51 -0700 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2013-08-25 20:20:57 -0700 |
commit | a6426023c8e67958ba528f28b09d502b17c7f319 (patch) | |
tree | 00cbc246c578ff4ebf2ee742fa1d168887daa9ff | |
parent | 5c7c40adc100c3a29ec9df5959e2124abcfed487 (diff) | |
download | rabbitmq-c-a6426023c8e67958ba528f28b09d502b17c7f319.tar.gz |
FIX: destroy amqp_envelope_t in consumer example
Make sure to destroy the envelope object in the amqp_consumer.c example
-rw-r--r-- | examples/amqp_consumer.c | 2 | ||||
-rw-r--r-- | examples/amqps_consumer.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/examples/amqp_consumer.c b/examples/amqp_consumer.c index 62da0ca..11e186e 100644 --- a/examples/amqp_consumer.c +++ b/examples/amqp_consumer.c @@ -136,6 +136,8 @@ static void run(amqp_connection_state_t conn) } } + } else { + amqp_destroy_envelope(&envelope); } received++; diff --git a/examples/amqps_consumer.c b/examples/amqps_consumer.c index d4cd294..affe0f6 100644 --- a/examples/amqps_consumer.c +++ b/examples/amqps_consumer.c @@ -138,8 +138,11 @@ static void run(amqp_connection_state_t conn) } } + } else { + amqp_destroy_envelope(&envelope); } + received++; } } |