>> The order of the malloc()s and free()s are different. The new handle is
>> read first, and then the old handle is released (in
>> nwamd_enm_handle_init_event()), so it is technically a x = malloc(N), y
>> = malloc(N), free(x), x = y.
>>
> If you can prove that the handle will never be free'd before it is
> realloc'd (reread) then your comparison is fine. Since you free the
> release before calling the enm callout I'm not sure how you do that.
>
This is true. In nwamd_enm_handle_init_event(), the order of calls when
the object is re-read is:
nwam_enm_read()
nwamd_object_find()
nwam_enm_free()
The other solution I can this of is to store the gettimeofday() when the
script starts (in the object also). Then, if the object is re-read,
this time is emptied out. When the script finishes running, the object
is re-locked and the time on it can be checked to make sure that it
hasn't been re-read. I think this would be a cleaner solution, rather
than relying on ordering of function calls.
Anurag