Fix double-free error.
Signed-off-by: Qi Tao taoqi10@huawei.com --- wd.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/wd.c b/wd.c index abadcf91..6d01158d 100644 --- a/wd.c +++ b/wd.c @@ -938,9 +938,6 @@ void wd_release_alg_cap(struct wd_capability *head) cap_pnext = cap_pnext->next; free(cap_node); } - - if (head) - free(head); }
struct wd_capability *wd_get_alg_cap(void)