CONTRIB: da: fix memory leak in dummy function da_atlas_open()
authorWilly Tarreau <w@1wt.eu>
Sun, 12 Jul 2020 07:12:07 +0000 (09:12 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 17 Jul 2020 08:27:25 +0000 (10:27 +0200)
commita94c49d6edc10ef7441376341ad14b207a7c2a34
tree3e35f6863368b4dd231f0cb38a6d2ac65e4306d8
parent37a8e1785c31fa93de36ef582d047b244335c4ca
CONTRIB: da: fix memory leak in dummy function da_atlas_open()

The dummy function takes care of doing a bit of work using a malloc()
to avoid returning a constant but it doesn't free the tested pointer,
which coverity noticed in issue #741. Let's free it before testing it
for the return value.

This may be backported but is not important since this code is only
present to allow to build the device detection code and not to actually
run it.

(cherry picked from commit 62fd12149f73feb4e9c93a961670d527436a6e33)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 7bd62cad8b711ed0b39ca00bf74ca326909ff73d)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
contrib/deviceatlas/dac.c