Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not free string #253

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class NodeJSAnoncreds implements Anoncreds {
this.nativeAnoncreds.anoncreds_generate_nonce(ret)
this.handleError()

return handleReturnPointer<string>(ret, this.nativeAnoncreds.anoncreds_string_free)
return handleReturnPointer<string>(ret)
}

public createSchema(options: {
Expand All @@ -89,7 +89,7 @@ export class NodeJSAnoncreds implements Anoncreds {
this.nativeAnoncreds.anoncreds_revocation_registry_definition_get_attribute(objectHandle, name, ret)
this.handleError()

return handleReturnPointer<string>(ret, this.nativeAnoncreds.anoncreds_string_free)
return handleReturnPointer<string>(ret)
}

public credentialGetAttribute(options: { objectHandle: ObjectHandle; name: string }) {
Expand All @@ -99,7 +99,7 @@ export class NodeJSAnoncreds implements Anoncreds {
this.nativeAnoncreds.anoncreds_credential_get_attribute(objectHandle, name, ret)
this.handleError()

return handleReturnPointer<string>(ret, this.nativeAnoncreds.anoncreds_string_free)
return handleReturnPointer<string>(ret)
}

public createCredentialDefinition(options: {
Expand Down Expand Up @@ -207,7 +207,7 @@ export class NodeJSAnoncreds implements Anoncreds {
this.nativeAnoncreds.anoncreds_encode_credential_attributes(attributeRawValues, ret)
this.handleError()

const result = handleReturnPointer<string>(ret, this.nativeAnoncreds.anoncreds_string_free)
const result = handleReturnPointer<string>(ret)

return result.split(',')
}
Expand Down Expand Up @@ -288,7 +288,7 @@ export class NodeJSAnoncreds implements Anoncreds {
this.nativeAnoncreds.anoncreds_create_link_secret(ret)
this.handleError()

return handleReturnPointer<string>(ret, this.nativeAnoncreds.anoncreds_string_free)
return handleReturnPointer<string>(ret)
}

public createPresentation(options: {
Expand Down Expand Up @@ -632,7 +632,7 @@ export class NodeJSAnoncreds implements Anoncreds {
this.nativeAnoncreds.anoncreds_get_current_error(ret)
this.handleError()

return handleReturnPointer<string>(ret, this.nativeAnoncreds.anoncreds_string_free)
return handleReturnPointer<string>(ret)
}

private objectFromJson(method: (byteBuffer: Buffer, ret: Buffer) => unknown, options: { json: string }) {
Expand Down Expand Up @@ -731,7 +731,7 @@ export class NodeJSAnoncreds implements Anoncreds {
this.nativeAnoncreds.anoncreds_object_get_type_name(objectHandle, ret)
this.handleError()

return handleReturnPointer<string>(ret, this.nativeAnoncreds.anoncreds_string_free)
return handleReturnPointer<string>(ret)
}

public objectFree(options: { objectHandle: ObjectHandle }) {
Expand Down