CLEANUP: Reapply ha_free.cocci (2)

This reapplies ha_free.cocci across the whole src/ tree.
This commit is contained in:
Tim Duesterhus 2026-04-28 21:59:14 +02:00 committed by Willy Tarreau
parent 0bf844aaca
commit 213ee17119
2 changed files with 3 additions and 6 deletions

View File

@ -80,8 +80,7 @@ static struct hbuf *hbuf_alloc(struct hbuf *h)
static inline void free_hbuf(struct hbuf *h)
{
free(h->area);
h->area = NULL;
ha_free(&h->area);
}
__attribute__ ((format(printf, 2, 3)))

View File

@ -7565,8 +7565,7 @@ int backup_env(void)
free(*tmp);
tmp++;
}
free(init_env);
init_env = NULL;
ha_free(&init_env);
return -1;
}
tmp++;
@ -7761,8 +7760,7 @@ void ha_freearray(char ***array)
char **r = *array;
for (i = 0; r && r[i]; i++) {
free(r[i]);
r[i] = NULL;
ha_free(&r[i]);
}
*array = NULL;
}