mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[build] fix Wmismatched-deallocator warnings
With custom malloc function attributes the fail path in the _New functions produces warnings due to allocator mismatches. Silence them.
This commit is contained in:
@@ -83,7 +83,10 @@ ChannelStateTracker* channelTracker_new(pServerStaticChannelContext* channel,
|
||||
return ret;
|
||||
|
||||
fail:
|
||||
WINPR_PRAGMA_DIAG_PUSH
|
||||
WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
|
||||
channelTracker_free(ret);
|
||||
WINPR_PRAGMA_DIAG_POP
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -329,7 +329,10 @@ proxyData* proxy_data_new(void)
|
||||
|
||||
return pdata;
|
||||
error:
|
||||
WINPR_PRAGMA_DIAG_PUSH
|
||||
WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
|
||||
proxy_data_free(pdata);
|
||||
WINPR_PRAGMA_DIAG_POP
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -959,7 +959,10 @@ proxyServer* pf_server_new(const proxyConfig* config)
|
||||
return server;
|
||||
|
||||
out:
|
||||
WINPR_PRAGMA_DIAG_PUSH
|
||||
WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
|
||||
pf_server_free(server);
|
||||
WINPR_PRAGMA_DIAG_POP
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -237,7 +237,10 @@ rdpShadowCapture* shadow_capture_new(rdpShadowServer* server)
|
||||
|
||||
if (!InitializeCriticalSectionAndSpinCount(&(capture->lock), 4000))
|
||||
{
|
||||
WINPR_PRAGMA_DIAG_PUSH
|
||||
WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
|
||||
shadow_capture_free(capture);
|
||||
WINPR_PRAGMA_DIAG_POP
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,10 @@ rdpShadowScreen* shadow_screen_new(rdpShadowServer* server)
|
||||
return screen;
|
||||
|
||||
fail:
|
||||
WINPR_PRAGMA_DIAG_PUSH
|
||||
WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
|
||||
shadow_screen_free(screen);
|
||||
WINPR_PRAGMA_DIAG_POP
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user