---
name: "kobject_init"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/kobject_init"
---

# kobject\_init(9)

initialize a kobject structure

## NAME

kobject\_init - initialize a kobject structure

## SYNOPSIS

**void kobject\_init(struct kobject \*** *kobj***, struct kobj\_type \*** *ktype***);**

## ARGUMENTS

*kobj*

pointer to the kobject to initialize

*ktype*

pointer to the ktype for this kobject.

## DESCRIPTION

This function will properly initialize a kobject such that it can then be passed to the **kobject\_add** call.

After this function is called, the kobject MUST be cleaned up by a call to **kobject\_put**, not by a call to kfree directly to ensure that all of the memory is cleaned up properly.

## COPYRIGHT
