On Mon, 15 Apr 1996 02:27:51 -0400 (EDT), "Hades" <firstname.lastname@example.org> wrote: >This is driving me absolutely bonkers!!!! This is my olc code to add the new >object to the obj_protos linked list: > > struct obj_data *new_obj; > > CREATE(new_obj, struct obj_data, 1); > *new_obj = *(d->edit_obj); > new_obj->name = str_dup(d->edit_obj->name); > new_obj->short_description = str_dup(d->edit_obj->short_description); > new_obj->description = str_dup(d->edit_obj->description); > new_obj->action_description = str_dup(d->edit_obj->action_description > new_obj->item_number = d->edit_obj->item_number; > lognum(new_obj->item_number); > new_obj->next = NULL; > new_obj->next_proto = obj_protos; > obj_protos = new_obj; > >Looks ok, right? Looks like it should work. It really does sound like memory being freed, though I'm sure you've checked all that, so all I can suggest is a different approach: d->edit_obj->next = NULL; d->edit_obj->next_proto = obj_protos; obj_protos = d->edit_obj; d->edit_obj = NULL; Cut out the middleman so to speak :) Hope this helps, G'luck, Rv.
This archive was generated by hypermail 2b30 : 12/18/00 PST