Merge pull request #73 from ityuhui/yh-number-array

Allocate memory for the element of array when the type is number
This commit is contained in:
Kubernetes Prow Robot
2021-08-15 09:01:46 -07:00
committed by GitHub

View File

@@ -230,7 +230,13 @@ v1_pod_security_context_t *v1_pod_security_context_parseFromJSON(cJSON *v1_pod_s
{
goto end;
}
list_addElement(supplemental_groupsList , &supplemental_groups_local->valuedouble);
double *supplemental_groups_local_value = (double *)calloc(1, sizeof(double));
if(!supplemental_groups_local_value)
{
goto end;
}
*supplemental_groups_local_value = supplemental_groups_local->valuedouble;
list_addElement(supplemental_groupsList , supplemental_groups_local_value);
}
}