Skip to content

Commit

Permalink
variant: return NULL on allocation exception (CID 507556)
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Aug 26, 2024
1 parent 7ff27c1 commit 8ec437a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cfl_variant.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct cfl_variant *cfl_variant_create_from_string_s(char *value, size_t value_s
instance->data.as_string = cfl_sds_create_len(value, value_size);
if (instance->data.as_string == NULL) {
free(instance);
instance = NULL;
return NULL;
}

}
Expand Down

0 comments on commit 8ec437a

Please sign in to comment.