[server] mark all WINPR_ATTR_MALLOC also nodiscard

This commit is contained in:
akallabeth
2026-01-26 13:08:14 +01:00
parent 3a8eeaa24a
commit 460ca149f2
8 changed files with 8 additions and 0 deletions

View File

@@ -36,6 +36,7 @@ typedef PfChannelResult (*ChannelTrackerPeekFn)(ChannelStateTracker* tracker, BO
void channelTracker_free(ChannelStateTracker* t);
WINPR_ATTR_MALLOC(channelTracker_free, 1)
WINPR_ATTR_NODISCARD
ChannelStateTracker* channelTracker_new(pServerStaticChannelContext* channel,
ChannelTrackerPeekFn fn, void* data);

View File

@@ -114,6 +114,7 @@ static const char* key_cert_file = "CertificateFile";
static const char* key_cert_content = "CertificateContent";
WINPR_ATTR_MALLOC(CommandLineParserFree, 1)
WINPR_ATTR_NODISCARD
static char** pf_config_parse_comma_separated_list(const char* list, size_t* count)
{
if (!list || !count)

View File

@@ -43,6 +43,7 @@ extern "C"
void shadow_capture_free(rdpShadowCapture* capture);
WINPR_ATTR_MALLOC(shadow_capture_free, 1)
WINPR_ATTR_NODISCARD
rdpShadowCapture* shadow_capture_new(rdpShadowServer* server);
#ifdef __cplusplus

View File

@@ -72,6 +72,7 @@ extern "C"
void shadow_encoder_free(rdpShadowEncoder* encoder);
WINPR_ATTR_MALLOC(shadow_encoder_free, 1)
WINPR_ATTR_NODISCARD
rdpShadowEncoder* shadow_encoder_new(rdpShadowClient* client);
#ifdef __cplusplus

View File

@@ -39,6 +39,7 @@ extern "C"
void shadow_multiclient_free(rdpShadowMultiClientEvent* event);
WINPR_ATTR_MALLOC(shadow_multiclient_free, 1)
WINPR_ATTR_NODISCARD
rdpShadowMultiClientEvent* shadow_multiclient_new(void);
void shadow_multiclient_publish(rdpShadowMultiClientEvent* event);

View File

@@ -46,6 +46,7 @@ extern "C"
void shadow_screen_free(rdpShadowScreen* screen);
WINPR_ATTR_MALLOC(shadow_screen_free, 1)
WINPR_ATTR_NODISCARD
rdpShadowScreen* shadow_screen_new(rdpShadowServer* server);
#ifdef __cplusplus

View File

@@ -32,6 +32,7 @@ extern "C"
void shadow_subsystem_free(rdpShadowSubsystem* subsystem);
WINPR_ATTR_MALLOC(shadow_subsystem_free, 1)
WINPR_ATTR_NODISCARD
rdpShadowSubsystem* shadow_subsystem_new(void);
int shadow_subsystem_init(rdpShadowSubsystem* subsystem, rdpShadowServer* server);

View File

@@ -32,6 +32,7 @@ extern "C"
void shadow_surface_free(rdpShadowSurface* surface);
WINPR_ATTR_MALLOC(shadow_surface_free, 1)
WINPR_ATTR_NODISCARD
rdpShadowSurface* shadow_surface_new(rdpShadowServer* server, UINT16 x, UINT16 y, UINT32 width,
UINT32 height);