mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
handle null pointer: compose_patch
This commit is contained in:
parent
c46c4d1559
commit
2d252ae595
@ -1043,7 +1043,14 @@ CJSON_PUBLIC(int) cJSONUtils_ApplyPatchesCaseSensitive(cJSON * const object, con
|
||||
|
||||
static void compose_patch(cJSON * const patches, const unsigned char * const operation, const unsigned char * const path, const unsigned char *suffix, const cJSON * const value)
|
||||
{
|
||||
cJSON *patch = cJSON_CreateObject();
|
||||
cJSON *patch = NULL;
|
||||
|
||||
if ((patches == NULL) || (operation == NULL) || (path == NULL))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
patch = cJSON_CreateObject();
|
||||
if (patch == NULL)
|
||||
{
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user