mike-jumper opened a new pull request #251: GUACAMOLE-935: Free internals of rdpBitmap only when required (FreeRDP 2.0.0-rc0 and earlier). URL: https://github.com/apache/guacamole-server/pull/251 This change adds an test to the `configure` script which determines whether we are building against FreeRDP 2.0.0-rc0, which had a `Bitmap_Free()` which freed bitmaps. For all newer versions of FreeRDP 2.0.0, `Bitmap_Free()` doesn't - it simply wraps the implementation-specific free handler, and it's on the implementation to know which internal parts of `rdpBitmap` were allocated by `Bitmap_Alloc()` and must now be freed. The latter was handled in commit 8dda26a when the resulting memory leak was discovered during valgrind testing, but this now must be made conditional as this would result in a double-free against 2.0.0-rc0. Unfortunately, the test itself is awkward: * It is not possible to test `Bitmap_Free()` behavior in itself. We must test version numbers. * While we can test numeric version macros, the only numeric version macros available always indicate that the version is "2.0.0". * Version macros exist which indicate the RC number and inter-RC number, but they are strings. The C preprocessor cannot test string values. Because of these limitations, the test can only be performed by either compiling a test program and running it (which can only be done when not cross-compiling) or by checking preprocessor output. This change ultimately goes with the latter approach.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
