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

Function dealloc_oextra

src/mkobj.c:95–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void
96dealloc_oextra(struct obj *o)
97{
98 struct oextra *x = o->oextra;
99
100 if (x) {
101 if (x->oname)
102 free((genericptr_t) x->oname), x->oname = 0;
103 if (x->omonst)
104 free_omonst(o); /* note: pass 'o' rather than 'x' */
105 if (x->omailcmd)
106 free((genericptr_t) x->omailcmd), x->omailcmd = 0;
107
108 free((genericptr_t) x);
109 o->oextra = (struct oextra *) 0;
110 }
111}
112
113void
114newomonst(struct obj *otmp)

Callers 2

dealloc_obj_realFunction · 0.85
fracture_rockFunction · 0.85

Calls 1

free_omonstFunction · 0.70

Tested by

no test coverage detected