Opened 7 years ago

Closed 7 years ago

#3908 closed defect (fixed)

Memory leak when lwgeom_simplify returns an empty geom

Reported by: Algunenano Owned by: strk
Priority: high Milestone: PostGIS 2.5.0
Component: liblwgeom Version: master
Keywords: Cc:

Description

Detected with asan. I think only trunk is affected.

Example:

Direct leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x7f67953bbae9 in __interceptor_malloc /build/gcc-multilib/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:62
    #1 0x7f6794fd8d8e in lwpoly_clone_deep /home/raul/dev/public/postgis/liblwgeom/lwpoly.c:231
    #2 0x7f6794fd1298 in lwgeom_simplify /home/raul/dev/public/postgis/liblwgeom/lwgeom.c:1825
    #3 0x55cc92159ea1 in test_lwgeom_simplify /home/raul/dev/public/postgis/liblwgeom/cunit/cu_algorithm.c:1072
    #4 0x7f6794b40087 in run_single_test /tmp/yaourt-tmp-raul/aur-cunit/src/CUnit-2.1-3/CUnit/Sources/Framework/TestRun.c:991

Github PR: https://github.com/postgis/postgis/pull/166

Change History (1)

comment:1 by pramsey, 7 years ago

Resolution: fixed
Status: newclosed

In 16015:

Fix memory leak when lwgeom_simplify returns an empty geom
From Raúl Marín Rodríguez
Closes #3908

Note: See TracTickets for help on using tickets.