From ce871657192e4a310fc843a349b18f7fddcb783c Mon Sep 17 00:00:00 2001 From: akallabeth Date: Fri, 7 Nov 2025 11:17:08 +0100 Subject: [PATCH] [c,attributes] mark functions with attirbute malloc --- include/freerdp/settings.h | 1 + winpr/include/winpr/json.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/freerdp/settings.h b/include/freerdp/settings.h index 4ffce003b..ed694e300 100644 --- a/include/freerdp/settings.h +++ b/include/freerdp/settings.h @@ -783,6 +783,7 @@ extern "C" * in case of an error. * @since version 3.16.0 */ + WINPR_ATTR_MALLOC(free, 1) FREERDP_API char* freerdp_settings_serialize(const rdpSettings* settings, BOOL pretty, size_t* plength); diff --git a/winpr/include/winpr/json.h b/winpr/include/winpr/json.h index d4b2f0eb6..de48124fc 100644 --- a/winpr/include/winpr/json.h +++ b/winpr/include/winpr/json.h @@ -401,6 +401,7 @@ extern "C" * @return A string representation of the JSON instance or \b NULL * @since version 3.6.0 */ + WINPR_ATTR_MALLOC(free, 1) WINPR_API char* WINPR_JSON_Print(WINPR_JSON* item); /** @@ -411,6 +412,7 @@ extern "C" * @return A string representation of the JSON instance or \b NULL * @since version 3.6.0 */ + WINPR_ATTR_MALLOC(free, 1) WINPR_API char* WINPR_JSON_PrintUnformatted(WINPR_JSON* item); #ifdef __cplusplus