mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[common,settings] fix add_string_or_null
* If the value is NULL do not check WINPR_JSON_AddNullToObject return as that is most likely also NULL * Fix testcase, always use goto for error handling
This commit is contained in:
@@ -2616,7 +2616,8 @@ static BOOL add_string_or_null(WINPR_JSON* json, const char* key, const char* va
|
||||
if (value)
|
||||
return WINPR_JSON_AddStringToObject(json, key, value) != NULL;
|
||||
|
||||
return WINPR_JSON_AddNullToObject(json, key) != NULL;
|
||||
(void)WINPR_JSON_AddNullToObject(json, key);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static WINPR_JSON* json_from_device_item(const RDPDR_DEVICE* val)
|
||||
|
||||
Reference in New Issue
Block a user