diff --git a/libckteec/src/serialize_ck.c b/libckteec/src/serialize_ck.c index 825677e2..c611e14c 100644 --- a/libckteec/src/serialize_ck.c +++ b/libckteec/src/serialize_ck.c @@ -95,18 +95,18 @@ static CK_RV serialize_indirect_attribute(struct serializer *obj, */ rv = serialize_32b(obj, attribute->type); if (rv) - return rv; + goto out; rv = serialize_32b(obj, obj2.size); if (rv) - return rv; + goto out; rv = serialize_buffer(obj, obj2.buffer, obj2.size); if (rv) - return rv; + goto out; obj->item_count++; - +out: release_serial_object(&obj2); return rv;