mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
libkmipclient: Fix error checking in kmip_node_clone()
Check the right pointer after strdup. Assisted-by: IBM Bob:2.0.0 Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Reviewed-by: Finn Callies <fcallies@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
de688f350f
commit
66581d57f3
@@ -897,7 +897,7 @@ struct kmip_node *kmip_node_clone(const struct kmip_node *node)
|
||||
case KMIP_TYPE_TEXT_STRING:
|
||||
if (node->text_value != NULL) {
|
||||
clone->text_value = strdup(node->text_value);
|
||||
if (node->text_value == NULL)
|
||||
if (clone->text_value == NULL)
|
||||
goto error;
|
||||
clone->length = strlen(clone->text_value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user