commit | 4c9a36cb40b93a5dc61d9ee2935ea64d18f2e495 | [log] [tgz] |
---|---|---|
author | Vadim Yanitskiy <axilirator@gmail.com> | Mon Feb 10 14:21:52 2020 +0700 |
committer | Vadim Yanitskiy <axilirator@gmail.com> | Mon Feb 10 14:22:07 2020 +0700 |
tree | f75adc35ec52ff35bb5d10d477d2831358a2267c | |
parent | 979c3b7e7ec87f79c8b20af6418264fa7c6c9f5b [diff] [blame] |
bitvec: make bitvec_free() safe against NULL Change-Id: Ifafb65e9d0adc286e16104274db440f38a86d800 Related: CID#208181, CID#208179
diff --git a/src/bitvec.c b/src/bitvec.c index ef8621c..5130705 100644 --- a/src/bitvec.c +++ b/src/bitvec.c
@@ -418,6 +418,8 @@ * \param[in] bit vector to free */ void bitvec_free(struct bitvec *bv) { + if (bv == NULL) + return; talloc_free(bv->data); talloc_free(bv); }