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 964d3e9f..0c65a61c 100644 --- a/wd.c +++ b/wd.c @@ -940,9 +940,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)