summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2013-08-20 10:51:51 -0700
committerAlan Antonuk <alan.antonuk@gmail.com>2013-08-20 10:53:40 -0700
commitf8c6cee7499e970afc1ff9d05919413f884696a5 (patch)
treecf91a504b9505b42f37c759b6b4bc1b57dc02616 /examples
parent1c213703c9fdd747bc71ea4f64943c3b4269f8cf (diff)
downloadrabbitmq-c-f8c6cee7499e970afc1ff9d05919413f884696a5.tar.gz
FIX: destroy amqp_envelope_t in consumer example
Make sure to destroy the envelope object in the amqp_consumer.c example
Diffstat (limited to 'examples')
-rw-r--r--examples/amqp_consumer.c2
-rw-r--r--examples/amqps_consumer.c3
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++;
}
}