---
name: "libnvmf_discovery_args_new-libnvme3"
section: "2"
platform: "linux"
package: "nvme-cli"
version: "3.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libnvmf_discovery_args_new-libnvme3"
---

# libnvmf\_discovery\_args\_new-libnvme3(2)

Allocate and initialise a new instance.

## NAME

libnvmf\_discovery\_args\_new - Allocate and initialise a new instance.

## SYNOPSIS

**int libnvmf\_discovery\_args\_new** **(struct libnvmf\_discovery\_args \*\*pp** *);*

## ARGUMENTS

- pp

  On success, \`\`\*pp\`\` is set to the newly allocated object.

## DESCRIPTION

Allocates a zeroed *struct libnvmf\_discovery\_args* on the heap. The caller must release it with **libnvmf\_discovery\_args\_free**.

## RETURN

0 on success, -EINVAL if *pp* is NULL, -ENOMEM if allocation fails.
