summaryrefslogtreecommitdiffstats
path: root/bftw.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2017-08-04 22:19:49 -0400
committerTavian Barnes <tavianator@tavianator.com>2017-08-10 22:33:06 -0400
commit7d262c38f44193a6e6b601e3ec436945b3bf4e5d (patch)
tree5842a57188aba5fcee0c531910758772b68a4e17 /bftw.c
parentc49dd050080562f829a053d3eb30597fb0c23339 (diff)
downloadbfs-7d262c38f44193a6e6b601e3ec436945b3bf4e5d.tar.xz
bftw: Assert that the queue is empty when freeing it
Diffstat (limited to 'bftw.c')
-rw-r--r--bftw.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bftw.c b/bftw.c
index e76ca09..ce3a567 100644
--- a/bftw.c
+++ b/bftw.c
@@ -545,6 +545,7 @@ static struct bftw_dir *bftw_queue_pop(struct bftw_queue *queue) {
/** Destroy a bftw_queue. */
static void bftw_queue_destroy(struct bftw_queue *queue) {
+ assert(queue->size == 0);
free(queue->buffer);
}