MCPcopy Create free account
hub / github.com/NetHack/NetHack / free_omonst

Function free_omonst

util/sfctool.c:1092–1105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1090}
1091
1092void
1093free_omonst(struct obj* otmp)
1094{
1095 if (otmp->oextra) {
1096 struct monst *m = OMONST(otmp);
1097
1098 if (m) {
1099 if (m->mextra)
1100 dealloc_mextra(m);
1101 free((genericptr_t) m);
1102 OMONST(otmp) = (struct monst *) 0;
1103 }
1104 }
1105}
1106
1107void
1108newomid(struct obj* otmp)

Callers

nothing calls this directly

Calls 1

dealloc_mextraFunction · 0.70

Tested by

no test coverage detected