diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2020-02-10 14:21:52 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2020-02-10 14:22:07 +0700 |
commit | 4c9a36cb40b93a5dc61d9ee2935ea64d18f2e495 (patch) | |
tree | f75adc35ec52ff35bb5d10d477d2831358a2267c /src | |
parent | 979c3b7e7ec87f79c8b20af6418264fa7c6c9f5b (diff) |
bitvec: make bitvec_free() safe against NULL
Change-Id: Ifafb65e9d0adc286e16104274db440f38a86d800
Related: CID#208181, CID#208179
Diffstat (limited to 'src')
-rw-r--r-- | src/bitvec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bitvec.c b/src/bitvec.c index ef8621c5..5130705f 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -418,6 +418,8 @@ struct bitvec *bitvec_alloc(unsigned int size, TALLOC_CTX *ctx) * \param[in] bit vector to free */ void bitvec_free(struct bitvec *bv) { + if (bv == NULL) + return; talloc_free(bv->data); talloc_free(bv); } |