ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-bugs: [Wireshark-bugs] [Bug 4474] Buildbot crash output: fuzz-2010-02-09-331.pcap

Date: Tue, 9 Feb 2010 02:25:57 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4474

--- Comment #2 from Guy Harris <guy@xxxxxxxxxxxx> 2010-02-09 02:25:56 PST ---
static void dcom_reinit( void) {
    /* Note that the memory for each machine, object and interface is
se_alloc'd and thus need not be freed here */
        /* I.E: only the actual lists need to be freed.                        
                                     */
    if (dcom_machines != NULL) {
        GList *machines;
        for(machines = dcom_machines; machines != NULL; machines =
g_list_next(machines)) {
            dcom_machine_t *machine = machines->data;

            if (machine->objects != NULL) {
                GList *objects;
                for(objects = machine->objects; objects != NULL; objects =
g_list_next(objects)) {
                    dcom_object_t *object = objects->data;
                    if (object->interfaces != NULL)
                        g_free(object->interfaces);
                }
                g_free(machine->objects);
            }
        }
        g_free(dcom_machines);
        dcom_machines = NULL;
    }

    if (dcom_interfaces != NULL) {
        g_list_free(dcom_interfaces);
        dcom_interfaces = NULL;
    }
}

The offending line is

                        g_free(object->interfaces);

If "the memory for each machine, object and interface is se_alloc'd and thus
need not be freed here", and that means that the actual objects in the
machine->objects list *aren't* freed, methinks that means that either

    1) we shouldn't be freeing the interfaces

or

    2) we should be setting object->interfaces to null.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.