]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: wurfl: fix memory leak of information list and patch strings at deinit
authorscientiamobile <haproxy@scientiamobile.com>
Tue, 11 Aug 2026 10:15:39 +0000 (12:15 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 12 Aug 2026 09:00:22 +0000 (11:00 +0200)
commita139938ec01f1577529b94b971b641754d860e62
treefcb1c086d0b8e128c68ad87760de5017fe6ddde3
parent6da161c1c7490e1db886643c4b8b5fce590a5987
BUG/MINOR: wurfl: fix memory leak of information list and patch strings at deinit

The strings duplicated with strdup() for each "wurfl-information-list" token
(wi->data.name) and each "wurfl-patch-file" path (wp->patch_file_path) were
never freed: ha_wurfl_deinit() only freed the list nodes, not the strings they
own. A simple config check on a configuration using these keywords is enough to
leak them, as reported by ASAN.

Free wi->data.name and wp->patch_file_path before freeing their list nodes.

This bug has been present since the module was introduced in commit d0027ed5b
("MEDIUM: wurfl: add Scientiamobile WURFL device detection module"). It should
be backported to all stable versions.

This fixes issue #2084.
Reported-by: Ilya Shipitsin <chipitsine@gmail.com>
addons/wurfl/wurfl.c