]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: tasks: fix possible segfault on task_destroy()
authorDragan Dosen <ddosen@haproxy.com>
Tue, 7 May 2019 13:25:25 +0000 (15:25 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 7 May 2019 16:58:52 +0000 (18:58 +0200)
commit75bc6d3e59a42fae5e5f197186e72ff587fc4ad3
treee1788a99775a4ba2ab3ed2962891efb12d239681
parent7d61a339216639a77361b9f41c9ac195fecf4897
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.
include/proto/task.h