commit | 75bc6d3e59a42fae5e5f197186e72ff587fc4ad3 | [log] [tgz] |
---|---|---|
author | Dragan Dosen <ddosen@haproxy.com> | Tue May 07 15:25:25 2019 +0200 |
committer | Willy Tarreau <w@1wt.eu> | Tue May 07 18:58:52 2019 +0200 |
tree | e1788a99775a4ba2ab3ed2962891efb12d239681 | |
parent | 7d61a339216639a77361b9f41c9ac195fecf4897 [diff] |
BUG/MEDIUM: tasks: fix possible segfault on task_destroy() Commit 3f795f7 ("MEDIUM: tasks: Merge task_delete() and task_free() into task_destroy().") replaced task_delete() and task_free() with a single function named task_destroy(). This patch adds a check for struct task* argument in function task_destroy() to prevent a possible segfault on NULL and also to make the function safer for use in other cases.